css3水波纹动画效果

css3水波纹动画效果

css3水波纹动画效果

<style>
    .wave {
        width: 200px;
        height: 200px;
        margin: 40px auto;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        overflow: hidden;
        position: relative;
    }
    .wave::before,
    .wave::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
    }
    .wave::before {
        background-color: rgba(100, 134, 178, .4);
        animation: wave 2s infinite;
        z-index: 1;
    }
    .wave::after {
        background-color: rgba(100, 134, 178, .4);
        animation: wave 2s infinite;
        animation-delay: .3s;
        z-index: 2;
    }
    .wave image {
        width: 60px;
        height: 60px;
        position: absolute;
        border-radius: 50%;
        z-index: 3;
    }
    @keyframes wave {
        0% {
            opacity: 1;
            transform: scale(0);
        }
        100% {
            opacity: 0;
            transform: scale(1);
        }
    }
</style>
<div class="wave">
    <img src="/theme/w3dev.gif">
</div>

 

加支付宝好友偷能量挖...


原创文章,转载请注明出处:css3水波纹动画效果

评论(0)Web开发网
阅读(490)喜欢(1)HTML/CSS兼容/XML