我有一个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