css实现水波纹效果

<!DOCTYPE html>
<html lang="en">
<head&gt;
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .wave-box {
            position: relative;
            width: 180px;
            height: 180px;
            border-radius: 50%;
            border: 3px solid rgb(246, 247, 248);
            box-shadow: 0 0 0 3px rgb(41, 134, 196);
        }

        .wave {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgb(23, 106, 201);
            border-radius: 50%;
            overflow: hidden;
        }
        .wave::before,
        .wave::after {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            width: 250%;
            height: 250%;
        }
        .wave::after {
            border-radius: 40%;
            background-color: rgb(240, 228, 228);
            animation: shi 5s linear infinite;
            transform: translate(-50%, -65%) rotate(0deg)
        }
        @keyframes shi {
            0% {
                transform: translate(-50%, -65%) rotate(0deg);
            }
            100% {
                transform: translate(-50%, -65%) rotate(360deg);
            }
        }
        .wave::before {
            border-radius: 42%;
            background-color: rgb(240, 228, 228, 0.2);
            transform: translate(-50%, -60%) rotate(0deg);
            animation: xu 7s linear infinite;
        }
        @keyframes xu {
            0% {
                transform: translate(-50%, -60%) rotate(0deg);
            }
            100% {
                transform: translate(-50%, -60%) rotate(360deg);
            }
        }
    </style>
</head>
<body>
    <div class="wave-box">
        <div class="wave"></div>
    </div>
</body>
</html>

原文地址:https://blog.csdn.net/weixin_44224921/article/details/134572279

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_19956.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注