1. Download Firework
2. Open the sprite in Firework,
you must first lock it and then change the width, otherwise the sprite will be deformed
3. The picture required for cutting.
The picture width/height is 23px, the x coordinate is 59, and the y coordinate is 194
4. Add to the css code
.user::before{
content: "";
display: block;/*行元素无大小,需改为块*/
/*图片的宽高*/
width: 23px;
height: 23px;
/*关键代码*/
background:url(../images/sprite.png) no-repeat -59px -194px;
/* 缩放 */
background-size: 104px auto;
margin: 4px auto 0;
}