【发布时间】:2014-05-19 21:32:16
【问题描述】:
我在列表中使用 CSS 生成的内容。当列表文本足够长可以换行时,它会向左移动太远。我希望文本在换行时保持与自身内联。
<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;
}
【问题讨论】:
-
尝试查看this 页面以获取多行填充的示例。
标签: css