• 清除浮动


     来自: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>
  • 相关阅读:
    js 计时器小练-20160601
    数位dp入门学习之路(正常枚举“过渡到”dfs枚举)
    An easy problem
    牌型种类 蓝桥杯
    带分数(穷举法) 蓝桥杯赛题
    表达式的转换----->中缀表达式转后缀表达式
    map 的使用
    netsatat 的使用
    两个矩形不相交
    前缀和
  • 原文地址:https://www.cnblogs.com/whatmiss/p/2673816.html
Copyright © 2020-2023  润新知