::之前在css中弄乱段落缩进

时间:2015-09-03 22:04:59

标签: html css indentation

我正在绘制一个东西列表,当项目有一个很长的描述时,文本返回到一个新的线条,它粘在左边,而在第一行,我用的是::之前{content:counter}

<ul style="list-style:none;">
<li>Short description</li>
<li>Second item</li>
<li>This stuff is the third element which has a very long text. So it is diplayed in several lines and the result is awful!</li>
</ul>

Fichier CSS

li::before {margin-left:50px; margin-right:20px; counter-increment: section; content: counter(section) ". ";}

0 个答案:

没有答案