zoukankan      html  css  js  c++  java
  • 栅格化布局技术分析——负边距布局

     1 <!DOCTYPE HTML>
     2 <html lang="en-US">
     3 <head>
     4 <meta charset="UTF-8">
     5 <title>Flying Swing Layout</title>
     6 <style type="text/css">
     7 <!--
     8 *{ margin:0; padding:0;}
     9 .content_box{
    10     padding:10px;
    11     background:#e1e1e1;
    12     border:1px dotted #ccc;
    13 }
    14 .bodyArea{ background:#f0f0f0;}
    15 /*-- 关键部分代码 --*/
    16 .bodyArea{ width:1250px; margin:50px auto; zoom:1;border:1px solid #aaa;padding:10px;}
    17 .body_wrap{ zoom:1; border:0px solid #aaa;}
    18 .body_wrap:after{ content:"."; display:block; height:0; clear:both; overflow:hidden;}
    19 .main{ float:left; width:100%;}
    20 .main_content{margin-left:240px; margin-right:200px;}
    21 .side{ float:left; width:230px; margin-left:-100%;}
    22 .extra{ float:left;  width:190px; margin-left:-190px;}
    23 .clear{ display:block; height:0; clear:both; overflow:hidden;}
    24 -->
    25 </style>
    26 </head>
    27 <body>
    28 <div class="bodyArea">
    29     <div class="body_wrap">
    30         <div class="main">
    31             <div class="main_content">
    32                 <div class="content_box">main:510px;
    33                     <div style="height:600px;background:#888;">
    34                         <div style="position:relative; left:100px;top:100px;200px;background:#aaa;">
    35 
    36                         ddd
    37                         </div>
    38                     </div>
    39                 </div>
    40             </div>
    41         </div>
    42         <div class="side">
    43             <div class="content_box">side:230px;</div>
    44         </div>
    45         <div class="extra">
    46             <div class="content_box">extra:190px;</div>
    47         </div>
    48     </div>
    49 </div>
    50 </body>
    51 </html>

    来自: http://www.jackness.org/?p=277

  • 相关阅读:
    Day5:面向对象的定义(下)
    SQL 查询中not in 与 not exists 的区别
    SQL 语句的执行顺序
    SQL server 连接 查询
    SQL server 约束
    静态类与非静态类,静态成员及使用方法
    HR面试总结
    值类型与引用类型精解
    面试技巧
    MVC与设计模式的关系及MVC的实现原理和设计原理
  • 原文地址:https://www.cnblogs.com/whatmiss/p/2674666.html
Copyright © 2011-2022 走看看