首页 > 其他 > 详细

内容始终靠底

时间:2015-09-09 13:26:19      阅读:146      评论:0      收藏:0      [点我收藏+]

代码结构如下:

<!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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!