我有一个columns: 2
的容器,但我想申请除<ul>
以外的所有孩子
有什么办法吗?试图将columns: 1
设置为<ul>
,但无法实现..
.text {
columns: 2;
/* irelevant */
width: 100%;
background: #ddd;
margin-bottom: 10px;
}
.text ul {
columns: 1;
}
<div class="text">
<p>Here is going to split the text in two columns</p>
<p>Which i what I want</p>
</div>
<div class="text">
<ul>
<li>I dont want to happen</li>
<li>For list items</li>
</ul>
</div>
答案 0 :(得分:0)
在css中添加此代码:
.text ul {
width: 200%;
display: inline-block;
}