正如您评论的那样,请在此处参考我的答案,这与您要查找的内容相似。
演示(我在链接的问题上回答的小提琴的修改版本)
你甚至在哪里为弧设置动画?@keyframe
这里我使用带有属性的CSS3 ,并将元素旋转 3 个部分,transform
即 at和. 休息是不言自明的,它将控制动画的总持续时间,将动画设置为,这里的最后一个对于动画获得一致的流程很重要。0%
50%
100%
animation-duration
animation-iteration-count
infinite
animation-timing-function
演示
.circle {
-webkit-animation-duration: 5s;
-webkit-animation-name: animation;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-moz-animation-duration: 5s;
-moz-animation-name: animation;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
animation-duration: 5s;
animation-name: animation;
animation-iteration-count: infinite;
animation-timing-function: linear;
width: 60px;
height: 60px;
border-style: solid;
border-radius: 35px;
border-width: 5px;
border-color: #999 transparent transparent transparent;
}
.arc-top { border-color: #999 transparent transparent transparent;}
@-moz-keyframes animation {
0% {-moz-transform: rotate(0);}
50% {-moz-transform: rotate(180deg);}
100% {-moz-transform: rotate(360deg);}
}
@-webkit-keyframes animation {
0% {-webkit-transform: rotate(0);}
50% {-webkit-transform: rotate(180deg);}
100% {-webkit-transform: rotate(360deg);}
}
@keyframes animation {
0% {transform: rotate(0);}
50% {transform: rotate(180deg);}
100% {transform: rotate(360deg);}
}