0
A
回答
1
您可以使用CSS列:
div {
-webkit-column-count: 2; /* Chrome, Safari, Opera */
-moz-column-count: 2; /* Firefox */
column-count: 2;
-webkit-column-gap: 20px; /* Chrome, Safari, Opera */
-moz-column-gap: 20px; /* Firefox */
column-gap: 20px;
}
<div>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.
</div>
當前瀏覽器支持: http://caniuse.com/#feat=multicolumn
3
.col {
-webkit-column-count: 2;
-webkit-column-gap: 40px;
-webkit-column-rule: 1px solid #ccc;
-moz-column-count: 2;
-moz-column-gap: 40px;
-moz-column-rule: 1px solid #ccc;
column-count: 2;
column-gap: 40px;
column-rule: 1px solid #ccc;
}
.col h1, .col h2, .col h3, .col h4, .col h5, .col h6 {
-webkit-column-span:all;
-moz-column-span:all;
column-span:all;
}
<div class='col'>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
相關問題
- 1. 如何使用css將圖像響應分成兩個div塊?
- 2. 將CSS按鈕分成兩列
- 3. CSS如何將包含div列表的div分割成2列
- 4. 動態左和固定右列寬div使用css
- 5. 使用php和javascript生成動態CSS
- 6. 如何將一個div分成多個行和列的CSS?
- 7. 用CSS分隔兩個div
- 8. 將列分成兩部分
- 9. 將列表分成兩列
- 10. 將2列分成兩列
- 11. 使用CSS動態控制兩個內部div的大小
- 12. CSS將一個響應式圓形div分割成兩半
- 13. 如何使用sql查詢動態分組和動態分列?
- 14. 如何將html頁面分成2個靜態div和1個可滾動div?
- 15. 如何使用css和html將這兩個Div變成這些形狀?
- 16. 如何使用jQuery和jsp生成動態下拉列表?
- 17. CSS:一行中有兩個div,動態(左)和固定(右)寬度。在動態div上使溢出文本
- 18. 使用JQuery和CSS擴展/縮小Div
- 19. 用jQuery滑動兩個DIV
- 20. 添加新的CSS類動態生成的圖像和div在jquery
- 21. jquery動態列表生成
- 22. 動態調整div爲使用css擴展列表
- 23. DIV-only兩列CSS佈局
- 24. 使用DIV和CSS
- 25. 將文本分成兩列,用PHP
- 26. 添加內嵌樣式動態生成的div使用jQuery
- 27. 無法使用jQuery選擇div(動態生成)
- 28. jquery:動態分配div高度
- 29. 用jQuery動態創建div
- 30. 如何使用CSS將頁面分成兩半?
這個插件很不錯,可以完成這項工作。 http://welcome.totheinter.net/columnizer-jquery-plugin/ – 2014-09-30 12:53:11