标签:
代码结构如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>内容始终位于底部案列</title>
<style>
html,body{width:100%;height:100%;margin:0;padding:0;}
.root{
height:calc(100% - 30px);
min-height:500px;
}
.root-footer{height:30px;}
.footer{
position:relative;
top:-30px;
height:30px;
text-align:center;
}
</style>
</head>
<body>
<div class="root">
<div class="root-footer"></div>
</div>
<div class="footer">这里的内容始终显示在底部</div>
</body>
</html>
标签:
原文地址:http://www.cnblogs.com/sj-blogs/p/4794043.html