CSS3彩虹点动画特效

<!DOCTYPE html>
<html lang="zh-CN">
<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;
            background-color: #121212;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }
        
        .rainbow-container {
            position: relative;
            width: 300px;
            height: 300px;
        }
        
        .dot {
            position: absolute;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            animation: rainbow-move 4s infinite ease-in-out;
            filter: blur(1px);
            box-shadow: 0 0 10px currentColor;
        }
        
        .dot:nth-child(1) {
            background-color: #ff0000;
            top: 50%;
            left: 50%;
            animation-delay: 0s;
        }
        
        .dot:nth-child(2) {
            background-color: #ff7f00;
            top: 30%;
            left: 30%;
            animation-delay: 0.2s;
        }
        
        .dot:nth-child(3) {
            background-color: #ffff00;
            top: 30%;
            left: 70%;
            animation-delay: 0.4s;
        }
        
        .dot:nth-child(4) {
            background-color: #00ff00;
            top: 70%;
            left: 30%;
            animation-delay: 0.6s;
        }
        
        .dot:nth-child(5) {
            background-color: #0000ff;
            top: 70%;
            left: 70%;
            animation-delay: 0.8s;
        }
        
        .dot:nth-child(6) {
            background-color: #4b0082;
            top: 10%;
            left: 50%;
            animation-delay: 1s;
        }
        
        .dot:nth-child(7) {
            background-color: #9400d3;
            top: 90%;
            left: 50%;
            animation-delay: 1.2s;
        }
        
        @keyframes rainbow-move {
            0%, 100% {
                transform: translate(0, 0) scale(1);
                opacity: 1;
            }
            25% {
                transform: translate(-50px, -50px) scale(1.5);
                opacity: 0.7;
            }
            50% {
                transform: translate(50px, -50px) scale(0.8);
                opacity: 0.9;
            }
            75% {
                transform: translate(-50px, 50px) scale(1.2);
                opacity: 0.6;
            }
        }
        
        .link {
            position: absolute;
            bottom: 20px;
            color: #666;
            font-family: Arial, sans-serif;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <div class="rainbow-container">
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
    </div>
    
   
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值