3d时空隧道效果代码

如下效果:


 


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3d动画</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }
        body {
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: black;
        }
        ul {
            position: relative;
            width: 100px;
            height: 100px;
            /* background-color: #096; */
        }
        li {
            position: absolute;
            top: 0;
            right: 0;
            width: 100px;
            height: 100px;
            border: 1px solid orange;
            filter: hue-rotate(calc(14deg * var(--i)));
            border-radius: 40px 20px 60px 50px;
            transform-style: preserve-3d;
            animation: move 5s linear infinite;
            /* 动画延迟 */
            animation-delay: calc(-1s * var(--i));

        }
        /* 3d动画  搭建 3d舞台   旋转  靠近(移动)*/
        @keyframes move {
            0% {
                transform: perspective(1000px) rotate(0) translateZ(0);
            }
            100% {
                transform: perspective(1000px) rotate(360deg) translateZ(1000px); 
            }
        }
    </style>
</head>
<body>
    <ul>
        <li style="--i:1"></li>
        <li style="--i:2"></li>
        <li style="--i:3"></li>
        <li style="--i:4"></li>
        <li style="--i:5"></li>
        <li style="--i:6"></li>
        <li style="--i:7"></li>
        <li style="--i:8"></li>
        <li style="--i:9"></li>
        <li style="--i:10"></li>
        <li style="--i:11"></li>
        <li style="--i:12"></li>
        <li style="--i:13"></li>
        <li style="--i:14"></li>
        <li style="--i:15"></li>
        <li style="--i:16"></li>
        <li style="--i:17"></li>
        <li style="--i:18"></li>
        <li style="--i:19"></li>
        <li style="--i:20"></li>
        <li style="--i:21"></li>
        <li style="--i:22"></li>
        <li style="--i:23"></li>
        <li style="--i:24"></li>
        <li style="--i:25"></li>
    </ul>
</body>
</html>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值