首页 > 其他 > 详细

圣杯布局

时间:2015-10-01 15:15:46      阅读:193      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>圣杯布局</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    body{
      font: bold 25px/50px Arial sens-serif;
    }
    #header,#footer{
      background: #666;
      text-align: center;
      height: 50px;
    }
    #footer{
      clear: both;
    }
    #content{
      padding-left: 200px;
      padding-right: 150px;
      overflow: hidden;
    }
    .center{
      position: relative;
      background: #ccc;
      height: 600px;
      width: 100%;
      float: left;
    }
    .left{
      position: relative;
      background: #f96;
      height: 600px;
      width: 200px;
      margin-left: -100%;
      left: -200px;
      float: left;
    }
    .right{
      position: relative;
      background: #69f;
      height: 600px;
      width: 150px;
      margin-left: -150px;
      right: -150px;
      float: left;
    }
  </style>
</head>
<body>
  <div id="header">header</div>
  <div id="content">
    <div class="center">center</div>
    <div class="left">left</div>
    <div class="right">right</div>
  </div>
  <div id="footer">footer</div>
</body>
</html>

技术分享

圣杯布局

原文:http://www.cnblogs.com/simonryan/p/4850956.html

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