我在整理股利(或多個)的一個問題,我有兩種類型a, b
排序的div
a - should always be at the front (all a types)
b - should be following all a types.
HTML:
<div class="" style="">
<div class="a">a</div>
<div class="a">a</div>
<div class="b">b</div>
<div class="a">a</div>
</div>
CSS:
.a, .b {
display:inline-block;
width:50px;
height:50px;
padding:15px;
margin:5px;
}
.a {
float:left;
background-color: blue;
}
.b { background-color: red; }
這似乎在一行罰款:
但休息爲一個網格:
期望的結果(箱數無關):
的jsfiddle:http://jsfiddle.net/kQkn9/
我會怎樣去解決這個問題?
我不明白你想要做什麼。 – woz
@woz更新的答案,也許你現在可以理解 – Kivylius