我在列表中使用CSS生成的內容。當列表文本足夠長時,它會向左移動太遠。我希望文本在包裝時保持內聯。停止文字環繞css genareated內容?
<ul>
<li>List item text</li>
<li>List item with longer text</li>
</ul>
li {
list-style: none;
margin-bottom: 20px;
}
li:before {
content: "+";
color: red;
margin-right: 10px;
}
ul {
width: 120px;
}
http://codepen.io/anon/pen/uFchG
嘗試檢查出對於多行填充的例子[此](http://css-tricks.com/multi-line-padded-text/)頁。 – notchris