【发布时间】:2017-05-22 00:23:40
【问题描述】:
我里面有 div 和 img 。如何让这个 div 用 img 展开?
<div class="container-fluid banner">
<img />
<div class="row text-center banner__div col-xs-12">
</div>
<div class="row text-center banner__slider col-xs-12">
</div>
这是我的 .scss:
.banner{
position:relative;
overflow: hidden;
background: linear-gradient($gradient-top, $gradient-bottom);
height: 960px; //I WANT TO GET RID OF IT
img{
content:url("../img/banner_bg.png");
position: absolute;
left: 0;
top: 0;
width: 100%;
height: auto;
opacity: 0.1;
}
}
已尝试显示:inline-block - 不起作用
【问题讨论】:
-
height : 100%用于 div