伪元素

	<!DOCTYPE html>
	<html lang="en">
	 <head>
	  <meta  http-equiv="content-type" content="text/html" charset="UTF-8">
	  <link rel="stylesheet" type="text/css" href="Untitled2.css">
	  <title>Document</title>
	 </head>
	 <body>
        <span>
		  香蕉
	    </span>
		 
	</body>
	</html>


span:before{
   content:"苹果";
}

span:after{
   content:"\9650\91cf\62a2";
}
/*.box{
  border:1px solid black;
}
.demo{
  float:left;
  width:100px;
  height:100px;
  background-color:black;
  color:#fff;
}
p{
  clear:both;
}*/

在这里插入图片描述

当content中为中文时会出现乱码,解决方法是利用转换工具,将中文转换成unicode编码的形式。转换工具的链接如下:
中文转unicode编码网址
查找限量抢的unicode编码是\u9650\u91cf\u62a2 ,注意一定要都去掉u才行。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值