我有一個Joomla網站與K2組件。我有一個不好看的「問題」。請參閱圖像:浮動框css
下面是CSS文件的一部分是什麼,我認爲它適用於這裏:
/* --- Item groups --- */
div.itemList {}
div#itemListLeading {}
div#itemListPrimary {}
div#itemListSecondary {}
div#itemListLinks {background:#f7fafe;border:1px solid #ddd;margin:8px 0;padding:8px;}
div.itemContainer {float:left;}
div.itemContainerLast {} /* this class is appended to the last container on each row of items (useful when you want to set 0 padding/margin to the last container) */
/* --- Item block for each item group --- */
div.catItemView {padding:4px;} /* this is the item container for this view - we add a generic padding so that items don't get stuck with each other */
/* Additional class appended to the element above for further styling per group item */
div.groupLeading {}
div.groupPrimary {}
div.groupSecondary {}
div.groupLinks {padding:0;margin:0;}
div.catItemIsFeatured {background:#ddd;border:1px dotted; padding:3px;margin:1px;} /* Attach a class for each featured item */
所以,我喜歡右側的樣子。謝謝!
你不能得到任何東西,看起來像純CSS。 Flexbox可以做到這一點,但這些元素將採用不同的順序。 – cimmanon 2013-02-23 12:22:59
你可能會看看[jQuery Masonry](http://masonry.desandro.com/) – MikeM 2013-02-23 12:32:46