响应的背景图像边距

时间:2018-05-13 19:47:27

标签: html css

HTML:

<div id="house-top"></div>
<div id="vse-doma-section-2"></div>

CSS:

#house-top {
  height: 976px;
  background-image: url('./img/house-top.png');
  background-repeat: no-repeat;
  background-size:100% auto;
}

#vse-doma-section-2 {
  height: 567px;
  background-image: url('./img/vse-doma-section-2.png');
  background-repeat: no-repeat;
  background-size:100% auto;
}

我的两张图片都有相同的width: 1920px。我只想让一个div置于另一个之下。此外,我想删除height并使背景图像响应,但当我因高度div而改变宽度时,看起来它有边距。

https://i.imgur.com/OmnrVxd.png https://i.imgur.com/GQSSXrv.png

0 个答案:

没有答案