实现让字体图标旋转 transform:rotate()
<style>
@font-face {
font-family: 'icomoon';
src: url('../fonts/icomoon.eot?6c68li');
src: url('../fonts/icomoon.eot?6c68li#iefix') format('embedded-opentype'), url('fonts/icomoon.ttf?6c68li') format('truetype'), url('fonts/icomoon.woff?6c68li') format('woff'), url('fonts/icomoon.svg?6c68li#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
div {
border: 1px solid black;
}
div::after {
content: '\e90e';
font-family: 'icomoon';
display: inline-block;
transition: all 0.5s;
}
div:hover::after {
transform: rotate(180deg);
}
</style>
</head>
<body>
<div>
我是div
</div>
</body>
鼠标移入前
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210427182523940.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NTgxNTI5NA==,size_16,color_FFFFFF,t_70#pic_center)
鼠标移入后
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210427182531578.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NTgxNTI5NA==,size_16,color_FFFFFF,t_70#pic_center)