CSS Div Background Image Fixed Height 100% Width

后端 未结 3 1519
孤独总比滥情好
孤独总比滥情好 2021-02-02 07:20

I\'m trying to setup a series of div\'s with a background image that each have their own fixed height, and stretch to fill up the width, even if there is overflow on the top/bot

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-02 08:03

    But the thing is that the .chapter class is not dynamic you're declaring a height:1200px

    so it's better to use background:cover and set with media queries specific height's for popular resolutions.

提交回复
热议问题