我有我的“header_main”绝对定位高度为100%基本覆盖整个屏幕。在header_main div n中还有另一个div,它也是绝对定位的。我已将“图标包装器”div设置为底部:0;但它不希望定位绝对底部。位置绝对定位的父div的底部的绝对div
<body id="top" class="no-js">
<header id="header_main">
<div class="icon-wrapper"></div>
</header>
</body>
我的CSS:
html, body {
height: 100%;
}
body{
font: 18px/27px $font-stack;
color: $text-color;
-webkit-font-smoothing: antialiased;
font-weight: 300;
}
#header_main{
height:100%;
width:100%;
position: absolute;
background: url('../images/ac-placeholder-img.jpg') no-repeat center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.icon-wrapper {
position:absolute;
height: 254px;
bottom: 0;
vertical-align:bottom;
}
只是一个错字这里...不是在我的代码 –
对不起... :-) –