我正在绘制一个东西列表,当项目有一个很长的描述时,文本返回到一个新的线条,它粘在左边,而在第一行,我用的是::之前{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) ". ";}