css动画-圆形扩散(音效)

半兽人 发表于: 2019-03-26   最后更新时间: 2020-07-01 09:56:35  
{{totalSubscript}} 订阅, 4,419 游览

圆会慢慢扩大,然后消失。

<!DOCTYPE html>
<html>
<head>
<style> 
    div{
        position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            opacity: .5;
            border-radius: 50%;
            width: 90px;
            height: 90px;
            border: 4px solid #00c1de;
            -moz-animation:mymove 5s infinite; /* Firefox */
            -webkit-animation:mymove 5s infinite; /* Safari and Chrome */
            -o-animation:mymove 5s infinite; /* Opera */
        }

    @keyframes mymove {
        from {
                 width: 90px;
                 height: 90px;
                 opacity: .5
        }
        to {
                 width: 326px;
                 height: 326px;
                 opacity: .1
        }
    }

    @-moz-keyframes mymove /* Firefox */
    {
        from {
                 width: 90px;
                 height: 90px;
                 opacity: .5
        }
        to {
                 width: 326px;
                 height: 326px;
                 opacity: .1
        }
    }

    @-webkit-keyframes mymove /* Safari and Chrome */
    {
        from {
                 width: 90px;
                 height: 90px;
                 opacity: .5
        }
        to {
                 width: 326px;
                 height: 326px;
                 opacity: .1
        }
    }

    @-o-keyframes mymove /* Opera */
    {
        from {
                    width: 90px;
                 height: 90px;
                 opacity: .5
        }
        to {
                 width: 326px;
                 height: 326px;
                 opacity: .1
        }
    }
</style>
</head>
<body>

<p><b>注释:</b>本例在 Internet Explorer 中无效。</p>

<div></div>

</body>
</html>

在线运行

更新于 2020-07-01
在线,7小时前登录

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