说明
css支持特殊符号,如下:
更多符号
详见:https://www.malaoshi.top/fuhao.html
代码实现
必须搭配 ::before 或 ::after 使用,详见下面链接:
https://www.malaoshi.top/show_1IX7T0aZctJ3.html
注意: :: 前后不能有空格
<style>
.a::before{ /* 搭配before*/
content: "\2600"; /*设置特殊字符*/
}
.b::after{ /* 搭配after*/
content: "\2690"; /*设置特殊字符*/
font-size: 40px; /*设置大小*/
color: red; /*设置颜色*/
}
</style>
<span class="a"></span>
<br>
<span class="b"></span>
