Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果内容溢出容器,我想实现以下布局:
所以说如果容器的高度是 400px,如果内容流过它会创建一个新列。
我创建了一个初学者小提琴 - http://jsfiddle.net/Gkzc8。红色框代表容器及其高度。
JSFiddle
使用 CSS3multi-column
multi-column
#miked {height:400px; background-color:rgba(255,0,0,0.3); -moz-column-count: 3; column-count: 3; /*overflow: hidden*/}
多栏阅读