效果如下圖所示(沒有做成gif,嘿嘿嘿)
<style>
.second-bar-box{
width: 100px;
height: 100px;
border-radius: 50%;
border: 1px solid #db192a;
position: relative;
}
.second-bar{
position: absolute;
left: 50%;
top: 0;
width: 2px;
height: 50px;
margin-left: -1px;
background-color: #ccc;
animation: barMove 60s linear infinite; /*動畫名稱、持續時間、運動方式、重複形式(也可以寫成具體次數,例如:5)*/
transform-origin: center bottom; /*控制以哪個點爲中心點*/
}
@keyframes barMove {
0% {
transform: rotateZ(0deg);
}
100% {
transform: rotateZ(360deg);
}
}
</style>
<div class="second-bar-box">
<div class="second-bar"></div>
</div>