CSS:加載中轉圈動畫效果

<div class="donut"></div>
@Keyframes donut-spin {
   0% {
     transform: rotate(0deg);
   }

   100% {
     transform: rotate(360deg);
   }
}

.donut {
   display: inline-block;
   border: 4px solid rgba(0, 0, 0, 0.1);
   border-left-color: #59a782;
   border-radius: 50%;
   width: 30px;
   height: 30px;
   animation: donut-spin 1.2s linear infinite;
}

效果圖:
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章