3D立体墙照片

handlebars 复制代码
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        html,
        body {
            margin: 0;
            padding: 0;
        }
        
        * {
            box-sizing: border-box;
        }
        
        body {
            background-color: #2f3542;
        }
        
        main {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
        }
        
        .cube {
            width: 250px;
            height: 250px;
            transform-style: preserve-3d;
            animation: rotate-cobe 10s ease-in-out infinite;
        }
        
        .cube>div {
            width: 250px;
            height: 250px;
            background-size: cover;
            background-position: center center;
            opacity: 0.8;
            position: absolute;
            box-shadow: inset 0 0 4px 2px rgba(106, 106, 106, 0.4);
        }
        /* 前 */
        
        .cube .img1 {
            background-image: url("https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00323-3881.jpg");
            transform: translateZ(125px);
        }
        /* 右 */
        
        .cube .img2 {
            background-image: url("https://img0.baidu.com/it/u=3607416692,1659289502&fm=253&fmt=auto&app=120&f=JPEG?w=1200&h=750");
            transform: rotateY(90deg) translateZ(125px);
        }
        /* 左 */
        
        .cube .img3 {
            background-image: url("https://img2.baidu.com/it/u=667685406,1155663261&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500");
            transform: rotateY(-90deg) translateZ(125px);
        }
        /* 下 */
        
        .cube .img4 {
            background-image: url("https://img2.baidu.com/it/u=1547725493,4110294476&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500");
            transform: rotateX(90deg) translateZ(125px);
        }
        /* 上 */
        
        .cube .img5 {
            background-image: url("https://img1.baidu.com/it/u=2345344959,2598464592&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=313");
            transform: rotateX(-90deg) translateZ(125px);
        }
        /* 后 */
        
        .cube .img6 {
            background-image: url("https://img1.baidu.com/it/u=475796613,1666623793&fm=253&fmt=auto&app=120&f=JPEG?w=1140&h=641");
            transform: rotateY(180deg) translateZ(125px);
        }
        
        @keyframes rotate-cobe {
            0% {
                transform: rotateX(0deg) rotateY(0deg);
            }
            20% {
                /* 右边图片 */
                transform: rotateY(-90deg);
            }
            40% {
                /* 上 */
                transform: rotateX(-90deg);
            }
            60% {
                /* 左 */
                transform: rotateY(90deg);
            }
            80% {
                /* 下 */
                transform: rotate(90deg);
            }
            100% {
                transform: rotateX(0deg) rotateY(0deg);
            }
        }
    </style>
</head>

<body>
    <main>
        <div class="cube">
            <div class="img1"></div>
            <div class="img2"></div>
            <div class="img3"></div>
            <div class="img4"></div>
            <div class="img5"></div>
            <div class="img6"></div>
        </div>
    </main>
</body>

</html>
相关推荐
CV实验室22 分钟前
TIP 2025 | 哈工大&哈佛等提出 TripleMixer:攻克雨雪雾干扰的3D点云去噪网络!
人工智能·计算机视觉·3d·论文
小Tomkk3 小时前
Rokid 开发空间小程序 实战
3d·小程序·rokid·jsar
向宇it3 小时前
【unity实战】MapMagic 2实战例子
游戏·3d·unity·c#·游戏引擎
郝学胜-神的一滴11 小时前
Three.js光照技术详解:为3D场景注入灵魂
开发语言·前端·javascript·3d·web3·webgl
列兵阿甘13 小时前
知微传感Dkam系列3D相机SDK例程篇:Python获取内外参
python·数码相机·3d
xingxing_F16 小时前
Rhino 8 for Mac 犀牛3D建模软件
macos·3d
街尾杂货店&18 小时前
css word属性
前端·css
奔袭的算法工程师1 天前
论文解读--RCBEVDet++:Toward High-accuracy Radar-Camera Fusion 3D Perception Network
3d
Demoncode_y1 天前
前端布局入门:flex、grid 及其他常用布局
前端·css·布局·flex·grid
Filotimo_2 天前
2.CSS3.(3).html
前端·css3