CSS SVG循环转圈动画例子

半兽人 发表于: 2023-10-12   最后更新时间: 2023-10-12 13:55:07  
{{totalSubscript}} 订阅, 445 游览
<!DOCTYPE html>
<html>
<head>
<style> 
    svg.active {
        animation: rotating 2s infinite linear;
        -moz-animation: rotating 2s infinite linear;
        -o-animation: rotating 2s infinite linear;
    }
    @keyframes rotating {
        from {
            transform: rotate(0)
        }
        to {
            transform: rotate(360deg)
        }
    }
</style>
</head>
<body>
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-repeat active" viewBox="0 0 16 16">
      <path d="M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"/>
      <path fill-rule="evenodd" d="M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"/>
    </svg>
</body>
</html>

在线调试

更新于 2023-10-12
在线,5小时前登录

查看css3更多相关的文章或提一个关于css3的问题,也可以与我们一起分享文章