先引入iconfont字体图标,使用unicode码,比如 其中&#是开头用以标明这是字符实体,x表示这是十六进制,而CSS的content接受的也是16进制的Unicode编码,所以可以直接写 content: “\e7bb”;
<style typel="text/css"> .show:before{ font-family: "iconfont"; content: "\eae2"; color: red; width: 20px; height: 20px; position: absolute; left: 5%; } </style> <div class="show"></div>















![[开源推荐] 适用于yii2的支付扩展包,支持支付宝、微信、银联支付](https://www.viphper.com/wp-content/uploads/2022/12/3694aa5b10f1dab-240x180.jpeg)