<ul>
<li>number</li>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
和样式表:
ul {
list-style-type: none
}
ul li {
float: left;
}
li:after {
content: ", "
}
li:before {
content: ": "
}
li:last-child:after {
content: "."
}
li:first-child:before {
content: ""
}
结果是:
number, 1, 2, 3, 4, 5.
如何解决此结果:
number: 1, 2, 3, 4, 5.