我们有eBook,因为列表中的一个既删除了文本又删除了项目符号。我可以使用( text -decoration: line-through;)删除文本。但是我可以击穿列表中的子弹,请帮我得到一个解决方案?
发布于 2015-01-08 16:36:15
以下是使用Order list HTML实现的一种方法:
<body>
This fiddle is used to demonstrate the list styling with CSS
<ol>
<li> Item 1 </li>
<li> Item 2 </li>
<li> Item 3 </li>
<li> Item 4 </li>
</ol>
</body>和CSS:
ol li
{
list-style-type: none;
counter-increment: item;
text-decoration:line-through;
}
ol li::before
{
content:counter(item) ".";
text-decoration:line-through;
}对于无序列表,情况会稍微复杂一些
HTML:
<body>
This fiddle is used to demonstrate the unordered list styling with CSS
<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4</li>
</ul>
</body>和CSS:
ul{
float:left;
}
li {
list-style: circle;
list-style-position: inside;
margin-top:8px;
}
li:after{
border-top:1px solid red;
display:block;
content:"";
margin-top:-8px;
}https://stackoverflow.com/questions/27833314
复制相似问题