我尝试了几乎所有东西,但没有奏效。 这是我的代码:
html, body{
width: 100%;
height: 100%;
margin:0px; }
.banner {
background: rgba(0, 0, 0, 0) url('http://wallpoper.com/images/00/31/33/51/black-background_00313351.jpg') 0 0 no-repeat fixed;
text-align: center;
background-size: cover;
height: 350px;
width: 100%;
margin-bottom: 3em;
display: table;
height: 100%;
}
<div class="banner" id="bannera"></div>
<div class="l-content" style="height: 700px;"> </div>