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

  • 相关阅读:
    准备学习FLEX目前心理状态篇
    Jeffrey Richter 大师 ,这次交流收获不少。
    Scrum框架 转贴
    换工作中......
    以后多参加些论坛,交流交流思想。
    机会在哪?
    2011年要比2010年更加努力!!!
    2012,处理考验我的一年,2013,继续学习快速成长的一年
    终于买了iPad,激动。。。。
    CSP认证
  • 原文地址:https://www.cnblogs.com/whatmiss/p/2674666.html
Copyright © 2011-2022 走看看