首页 > 其他 > 详细

圣杯布局

时间:2020-03-07 00:59:03      阅读:83      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body {
      min-width: 550px;
    }
    #container {
      padding-left: 200px; 
      padding-right: 150px;
    }
    #container .column {
      height: 200px;
      float: left;
    }
    #center {
      width: 100%;
      background: red;
    }
    #left {
      background: blue;
      width: 200px; 
      margin-left: -100%;
      position: relative;
      right: 200px;
    }
    #right {
      background: green;
      width: 150px; 
      margin-right: -150px; 
    }  
  </style>
</head>
<body>
  <div id="container">
    <div id="center" class="column">
    </div>


    <div id="left" class="column">
    </div>

    <div id="right" class="column">
    </div>
  </div>
</body>
</html>

 

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body {
      min-width550px;
    }
    #container {
      padding-left200px
      padding-right150px;
    }
    #container .column {
      height200px;
      floatleft;
    }
    #center {
      width100%;
      backgroundred;
    }
    #left {
      backgroundblue;
      width200px
      margin-left-100%;
      positionrelative;
      right200px;
    }
    #right {
      backgroundgreen;
      width150px
      margin-right-150px
    }  
  </style>
</head>
<body>
  <div id="container">
    <div id="center" class="column">
    </div>


    <div id="left" class="column">
    </div>

    <div id="right" class="column">
    </div>
  </div>
</body>
</html>

圣杯布局

原文:https://www.cnblogs.com/zwhbk/p/12431453.html

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