【发布时间】:2015-09-18 11:55:08
【问题描述】:
HTML:
<div class="site_wrapper">
<div class="top_wrapper">
<div class="top_bar_wrapper">
<div class="nav_bar_wrapper">
<ul>
<a href="#"><li>About Me</li></a>
<a href="#"><li>Work</li></a>
<a href="#"><li>Clients</li></a>
<a href="#"><li>Contact</li></a>
</ul>
</div>
</div>
</div>
</div>
CSS:
body{
margin:0;
padding:0;
font-weight: 100;
background-image: url(images/bg2.jpg);
}
.top_wrapper{
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
width: 100%;
height: 100%;
position: absolute;
bottom: 100px;
}
所以当我这样做时,它会将其他 div 推到屏幕之外,我希望我的导航栏在图像上,但我总是希望 img 距离屏幕底部 100 像素。帮我解决这个问题!!!
【问题讨论】:
-
您能否提供一个jsfiddle.net 来显示您的问题?