实现自适应位置--footer紧贴浏览器底部


<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>紧贴浏览器底部</title>
<style type="text/css">
* {
        padding: 0;
        margin: 0;
}
html {
        _overflow: auto;/*滚动条*/
}
body {
        _width: expression(this.parentNode.clientWidth);
}
html,
body {
        height: 100%;
}
.section {
        min-height: 100%;
        _height: 100%;/*ie6不识别min-height才加一句这个*/
        padding-bottom: 60px;

  -webkit-box-sizing: border-box;

  -moz-box-sizing: border-box;

  box-sizing: border-box;

}
.footer {
        height: 60px;
        background:#FF6600;
        margin-top: -60px;
        color: #FFF;
}
</style>
</head>
<body>
<div class="section">


</div>
<div class="footer">我这是在底部</div>
</body>
</html>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM