先看一下效果:
下面是代码实现:
.xin {
position: relative;
font-size: 20rpx;
color: #15bf5d;
border: 1rpx dashed #ccc;
padding-top: 20rpx;
}
.xin::after {
content: '';
background: url(https://.........com/_system/gAdd.png);
position: absolute;
background-size: 20rpx;
top: 30%;
left: 50%;
transform: translate(-50%, -50%);
width: 20rpx;
height: 20rpx;
}
坑总结:
在使用background
导入本地的加号图片的时候,微信可以正常从本地引入,但是到了支付宝,就显示错误。不允许在after中使用本地图片,只能使用url链接