• css圣杯布局、等高布局


    所谓圣杯布局,就是自适应浏览器的分辨率,也称双飞翼布局。

    例子:

     1 <style>
     2 body{margin:0;}
     3 .center{height:600px;background:#f60;margin:0 200px;}
     4 .left{width:200px;background:#fc0;height:600px; position:absolute;left:0;top:0;}
     5 .right{width:200px;background:#fcc;height:600px;position:absolute;right:0;top:0;}
     6 </style>
     7 </head>
     8 <body>
     9 <div class="center">2</div>
    10 <div class="left">1</div>
    11 <div class="right">3</div>

    等高布局:

    例子:

     1 style>
     2 body{margin:0;}
     3 .wrap{ 900px;margin:0 auto; border:10px solid #000; overflow:hidden;}
     4 .wrap:after{content:"";display:block;clear:both;}
     5 .left{200px;background:Red;float:left; padding-bottom:1000px; margin-bottom:-1000px;}
     6 .right{200px;background:blue;float:right;padding-bottom:1000px;margin-bottom:-1000px;}
     7 </style>
     8 </head>
     9 <body>
    10 <div class="wrap">
    11     <div class="left">
    12         &nbsp;页面内容<br/>
    13         &nbsp;页面内容<br/>
    14         &nbsp;页面内容<br/>
    15         &nbsp;页面内容<br/>
    16         &nbsp;页面内容<br/>
    17     </div>
    18     <div class="right">
    19     </div>
    20 </div>
  • 相关阅读:
    MySQL 分组
    MySQL LIKE 子句
    MySQL DELETE 语句
    MySQL UPDATE 查询
    MySQL where 子句
    MySQL 插入数据
    MySQL 查询数据
    MySQL 删除数据表
    MySQL 创建数据表
    MySQL 数据类型
  • 原文地址:https://www.cnblogs.com/wxydigua/p/3459744.html
Copyright © 2020-2023  润新知