现在要是还不会点样式,都不行啊!
<div class="box">内容</div>
.box {
position: relative;
width: 90px;
height: 90px;
border: 1px solid red;
}
.box::before {
content: "";
position: absolute;
width: 90px;
height: 90px;
left: 0;
z-index: -1;
background: url(./assets/logo.png) no-repeat;
background-size: cover;
transition-property: transform;
transition-duration: 8s;
animation: rotate 4s linear infinite;
}
@keyframes rotate{
0%{-webkit-transform:rotate(0deg);}
100%{-webkit-transform:rotate(360deg);}
}
大概就这意思,根据实际情况改改就差不多了。