对齐文章元素 [英] Aligning article elements
本文介绍了对齐文章元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的html5页面,我试图风格的一组文章。制品元件具有固定的宽度但是具有可变的高度。我尝试使用float:left。
In my html5 page I'm trying to style a group of articles. The article-elements have a fixed width but a variable height. I tried using float: left.
它应该看起来像下面的绿色框,但它看起来像红色框。框nr 3未正确对齐。
It should look like the green boxes below, but it looks like the red boxes. Box nr 3 is not aligned properly.
任何CSS3或甚至js方法来修复此问题?
Any CSS3 or even js way to fix this?
推荐答案
有一个jQuery插件名为 Masonry ,旨在实现此目的。
There is a plug-in for jQuery called Masonry that is designed to do this.
这篇关于对齐文章元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文