C3新特性: Div盒子360度旋转
//html
<div class="fengche">
<img src="../../../static/img/fengche.png" alt="" />
</div>
/* css */
<style scoped>
.fengche {
width: 100px;
height: 100px;
margin: auto;
/* background: turquoise; */
position: relative;
top: -50px;
animation: rotate 2s linear infinite;
}
@keyframes rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
.fengche > img {
width: 100px;
height: 100px;
}
</style>