纯CSS3双螺旋动画特效

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>纯CSS3双螺旋动画特效</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: #000;
            overflow: hidden;
        }
        
        .spiral-container {
            position: relative;
            width: 300px;
            height: 500px;
        }
        
        .spiral {
            position: absolute;
            width: 100%;
            height: 100%;
        }
        
        .spiral::before {
            content: "";
            position: absolute;
            top: 0;
            left: 50%;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            transform: translate(-50%, 0);
            animation: spiral-animation 4s linear infinite;
        }
        
        .spiral.left::before {
            background: linear-gradient(45deg, #ff00cc, #3333ff);
            box-shadow: 0 0 15px #ff00cc;
        }
        
        .spiral.right::before {
            background: linear-gradient(45deg, #00ffcc, #ff3399);
            box-shadow: 0 0 15px #00ffcc;
            animation-delay: 2s;
        }
        
        @keyframes spiral-animation {
            0% {
                top: 0;
                opacity: 1;
                transform: translate(-50%, 0) scale(1);
            }
            50% {
                opacity: 0.5;
                transform: translate(-50%, 250px) scale(0.5);
            }
            100% {
                top: 100%;
                opacity: 0;
                transform: translate(-50%, 0) scale(0.1);
            }
        }
        
        .spiral.left {
            animation: rotate-left 16s linear infinite;
        }
        
        .spiral.right {
            animation: rotate-right 16s linear infinite;
        }
        
        @keyframes rotate-left {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(-360deg);
            }
        }
        
        @keyframes rotate-right {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
        
        .spiral span {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-family: Arial, sans-serif;
            font-size: 14px;
            opacity: 0.7;
        }
        
        /* 插入链接样式 */
        .hidden-link {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            color: rgba(255,255,255,0.3);
            font-family: Arial, sans-serif;
            font-size: 12px;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <div class="spiral-container">
        <div class="spiral left"></div>
        <div class="spiral right"></div>
    </div>
    

</body>
</html>

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值