如何在CSS中使用十六进制值作为项目符号
这个问题在这里已经有了答案:
使用:before或:after :
.mybullet:before
{
content: "2022";
color: #f00;
display: inline-block;
}
.mybullet:before {
content: "2022";
color: #f00;
}<table>
<tr>
<td>
<span class="mybullet" /> <a href="#">Link1</a>
</td>
</tr>
</table>您需要将::before伪元素添加到您的代码中:
.mybullet::before {
content:"2022 ";
color:#f00;
}<table>
<tr>
<td><span class="mybullet" /> <a href="#">Link1</a>
</td>
</tr>
</table> 使用:before或:after
<span/>至<span></span>
.mybullet:before
{
content:"2022 ";
color:#f00;
display: inline-block;
}<table>
<tr>
<td>
<span class="mybullet"> <a href="#">Link1</a></span>
</td>
</tr>
</table>
链接地址: http://www.djcxy.com/p/15539.html
