css3随着外层包裹的旋转里面的图标为正
css3 旋转 图标 里面 随着 包裹
2023-09-14 08:58:23 时间
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);} }