CSS3 3D弹簧跳动动画

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS3 3D弹簧跳动动画</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: #f0f0f0;
            perspective: 1000px;
            overflow: hidden;
        }
        
        .spring-container {
            position: relative;
            width: 100px;
            height: 200px;
            transform-style: preserve-3d;
            animation: springBounce 2s infinite cubic-bezier(0.5, 0, 0.5, 1);
        }
        
        .spring {
            position: absolute;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom, #ff3366, #ff6699);
            border-radius: 50% 50% 10% 10%;
            box-shadow: 0 10px 25px rgba(255, 51, 102, 0.5);
            transform-style: preserve-3d;
            animation: springRotate 4s infinite linear;
        }
        
        .spring:before {
            content: '';
            position: absolute;
            top: -20px;
            left: 0;
            width: 100%;
            height: 40px;
            background: #ff3366;
            border-radius: 50%;
            box-shadow: 0 5px 15px rgba(255, 51, 102, 0.5);
        }
        
        .spring:after {
            content: '';
            position: absolute;
            bottom: -20px;
            left: 0;
            width: 100%;
            height: 40px;
            background: #ff6699;
            border-radius: 50%;
            box-shadow: 0 -5px 15px rgba(255, 102, 153, 0.5);
        }
        
        @keyframes springBounce {
            0%, 100% {
                transform: translateY(0) scaleY(1);
            }
            25% {
                transform: translateY(-50px) scaleY(0.8);
            }
            50% {
                transform: translateY(0) scaleY(1.1);
            }
            75% {
                transform: translateY(30px) scaleY(0.9);
            }
        }
        
        @keyframes springRotate {
            0% {
                transform: rotateX(0deg) rotateY(0deg);
            }
            25% {
                transform: rotateX(30deg) rotateY(90deg);
            }
            50% {
                transform: rotateX(0deg) rotateY(180deg);
            }
            75% {
                transform: rotateX(-30deg) rotateY(270deg);
            }
            100% {
                transform: rotateX(0deg) rotateY(360deg);
            }
        }
        
        .link {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            color: #666;
            font-family: Arial, sans-serif;
            text-decoration: none;
            font-size: 12px;
        }
    </style>
</head>
<body>
    <div class="spring-container">
        <div class="spring"></div>
    </div>
    
    <a href="https://a.88a.org.cn/bvIu" class="link" target="_blank">更多动画特效</a>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值