div置于页面底部


一直对于页面置底有一些困惑,下面这个例子不知道能不能解决

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>foot置底</title>
	<style type="text/css">
        /*html 和 body 的高度必须*/
	html,body { height:100%;}
	.wrap { position:relative; height:auto; min-height:100%;}
	.content { padding-bottom:60px; height:auto; background:yellow;}
	.footer { width:100%; height:60px; background:red; left:0; position:absolute; bottom:0;}
	</style>
</head>
<body>
	<div class="wrap">
		<div class="content">
			000
		</div>
		<div class="footer"></div>
	</div>
</body>
</html>

最后通过实践,这种方法是可以实现的


免责声明!

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



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