我努力實現以下目標:對齊含量爲每行
1. max 2 cols, x rows
2. list item will wrap - if hide current item then next item will take its place
3. buttons must be aligned in both columns
4. there can be whitespace between the content and the button
5. no CSS3
目前一切看起來除了在「BBBBBBBBBB」內容的第二位好 - 鏈接:http://jsfiddle.net/jstime/t7319mpw/
圖像來幫助解釋:
不知道文字是動態的,但在這裏是用JS http://jsfiddle.net/t7319mpw/5/ – Dan 2014-08-27 19:46:54
浮啓動或內嵌塊不會將每個li設置爲相同的高度。顯示:flex可能有助於年輕的瀏覽器http://jsfiddle.net/t7319mpw/9/ – 2014-08-27 19:59:03
@丹高度的方法實際上在這裏效果很好,但有延遲,實際上可以看到元素移動 – Mercury 2014-08-27 20:03:49