css3随着外层包裹的旋转里面的图标为正

css3随着外层包裹的旋转里面的图标或者文字正

思路:里面的图标的a跟外面包裹的div反方向旋转就行

css:

.order-item{animation: rotation 22s linear infinite;}
.order-item a{animation: rotationback 22s linear infinite;}

 linear// 意思就是匀速的运动   infinite// 就是无限滚动的意思

@keyframes rotation{
    from {transform: rotate(0deg);}
    to {transform: rotate(360deg);}
}
@keyframes rotationback{
    from {transform: rotate(360deg);}
    to {transform: rotate(0deg);}
}

 

posted @ 2020-07-23 08:34  前端HL  阅读(234)  评论(0)    收藏  举报