<分区>
我在 Yahoo Weather 应用程序中看过这个动画。我觉得这很酷,我想做。
现在我创建了半圆并使用 css 关键帧让太阳沿着曲线路径运行
@-webkit-keyframes rotatekey {
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(360deg);}
}
.rotate {
-webkit-animation-name: rotatekey;
-webkit-animation-duration: 7s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
}
但我想知道如何使用 css 和 javascript 使黄色区域填充半圆?半圈外为透明区域。