• 清除浮动


     来自:http://www.iyunlu.com/view/css-xhtml/55.html

     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     2 <html xmlns="http://www.w3.org/1999/xhtml">
     3 <head>
     4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     5 <title> CSS - Table</title>
     6 <style>
     7 html ,body{
     8 top:0;
     9 margin:0;
    10 padding:0;
    11 }
    12 .body{
    13 position:fixed;
    14 width:100%;
    15 border:0px solid #111;
    16 }
    17 
    18 
    19 .clearfix1{
    20     border:1px solid #111;
    21     padding:10px;
    22 
    23 }
    24 
    25 .clearfix:after {content:"."; display:block; height:0; visibility:hidden; clear:both; }
    26 .clearfix { *zoom:1; }
    27 
    28 
    29 .content{
    30     float:left;
    31     width:200px;
    32     height:200px;
    33     border:1px solid #111;
    34 }
    35 </style>
    36 </head>
    37 <body>
    38 
    39 <div class="body">
    40 
    41     <div class="clearfix1 clearfix" >
    42         <div class="content">
    43             1
    44         </div>
    45         <div class="content">
    46             2
    47         </div>
    48         <div class="content">
    49             3
    50         </div>
    51         <div class="content">
    52             4
    53         </div>
    54     </div>
    55 
    56 </div>
    57 
    58 </body>
    59 </html>
  • 相关阅读:
    poj1631 LIS 裸题
    UESTC 电子科大专题训练 DP-N
    UESTC 电子科大专题训练 DP-M
    UESTC 电子科大专题训练 DP-D
    Codeforces Round #424 D
    Codeforces Round #424 C
    Codeforces Round #424 B
    Codeforces Round #424 A
    hiho一下159
    hiho一下158(hihocoder 1318)
  • 原文地址:https://www.cnblogs.com/whatmiss/p/2673816.html
Copyright © 2020-2023  润新知