gpt4 book ai didi

jquery - 使用 jquery 和 CSS 将动态 div 拆分为两列

转载 作者:太空宇宙 更新时间:2023-11-03 21:36:35 25 4
gpt4 key购买 nike

我有一个可能包含大量文本内容的 div。我必须将它分成两列 View 。 (Example)。

有什么方法可以使用 jquery 拆分 HTML 内容吗?

最佳答案

 .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>

关于jquery - 使用 jquery 和 CSS 将动态 div 拆分为两列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26121199/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com