我想對準黑色柱下的紅柱不改變HTML:浮動DIV頂部間距
是否對此有任何的jQuery或CSS的解決方案?
CSS:
.col{
width: 25%;
border: 1px solid black;
margin: 10px;
padding:2px;
float:left;
}
.clear{clear:both;}
.col1{height: 200px;}
.col2{height: 300px;}
.col3{height: 200px;}
.col4{height: 200px; border: 1px solid red;}
.col5{height: 220px; border: 1px solid red;}
.col6{height: 120px; border: 1px solid red;}
HTML:
<div class="col col1">1</div>
<div class="col col2">2</div>
<div class="col col3">3</div>
<div class="clear"></div>
<div class="col col4">4</div>
<div class="col col5">5</div>
<div class="col col6">6</div>
http://mattgemmell.com/2008/12/08/what-have-you-tried/ – lilalinux
@lilalinux,你可以指定[你有什麼嘗試?](http://whathaveyoutried.com)它非常方便的域名。 – Jashwant
@frank,請添加相關代碼,因爲jsfiddle不是永久代碼持有者 – Jashwant