<!DOCTYPE html >
<html>
    <head>
        <meta charset="utf-8" />
        <title>get objects by class</title>
        <style type="text/css">
        div{ background:#ccc}
        .no1{margin-bottom: 10px;}
        .no1,.no2{ width:100px; height:100px; float:left }
        .no2{ clear:both;}
        .no3{ margin-left:110px; *margin-left:107px; width:200px; height:210px }
        </style>
    </head>
    <body >
       
        <div class="no1">111</div>
        <div class="no2">222</div>
        <div class="no3">333</div>
    </body>
</html>
做这个布局有两个要点:
1。第二个div要清除浮动
2.考虑到IE6经常出现的三像素文本慢移,所以用IE6可识别的*做hack.

转载于:https://blog.csdn.net/di84186/article/details/102401922

 

版权声明:本文为shimily原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/shimily/articles/12202112.html