3D立体旋转相册

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D立体旋转相册</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Arial', sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: #111;
            overflow: hidden;
            perspective: 1000px;
        }
        
        .container {
            position: relative;
            width: 100%;
            max-width: 1200px;
            text-align: center;
            margin: 0 auto;
            padding: 20px;
        }
        
        h1 {
            color: #fff;
            margin-bottom: 50px;
            text-shadow: 0 0 10px rgba(255,255,255,0.5);
        }
        
        .photo-album {
            position: relative;
            width: 300px;
            height: 200px;
            margin: 0 auto;
            transform-style: preserve-3d;
            animation: rotate 20s infinite linear;
        }
        
        .photo-album:hover {
            animation-play-state: paused;
        }
        
        .photo {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 5px;
            overflow: hidden;
            box-shadow: 0 0 20px rgba(255,255,255,0.3);
            transition: all 0.5s ease;
        }
        
        .photo:hover {
            transform: scale(1.1);
            box-shadow: 0 0 30px rgba(255,255,255,0.6);
            z-index: 10;
        }
        
        .photo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .photo:nth-child(1) {
            transform: rotateY(0deg) translateZ(400px);
            background: #ff7675;
        }
        
        .photo:nth-child(2) {
            transform: rotateY(40deg) translateZ(400px);
            background: #74b9ff;
        }
        
        .photo:nth-child(3) {
            transform: rotateY(80deg) translateZ(400px);
            background: #55efc4;
        }
        
        .photo:nth-child(4) {
            transform: rotateY(120deg) translateZ(400px);
            background: #a29bfe;
        }
        
        .photo:nth-child(5) {
            transform: rotateY(160deg) translateZ(400px);
            background: #ffeaa7;
        }
        
        .photo:nth-child(6) {
            transform: rotateY(200deg) translateZ(400px);
            background: #fd79a8;
        }
        
        .photo:nth-child(7) {
            transform: rotateY(240deg) translateZ(400px);
            background: #81ecec;
        }
        
        .photo:nth-child(8) {
            transform: rotateY(280deg) translateZ(400px);
            background: #fab1a0;
        }
        
        .photo:nth-child(9) {
            transform: rotateY(320deg) translateZ(400px);
            background: #636e72;
        }
        
        @keyframes rotate {
            from {
                transform: rotateY(0deg);
            }
            to {
                transform: rotateY(360deg);
            }
        }
        
        .controls {
            margin-top: 50px;
            display: flex;
            justify-content: center;
            gap: 20px;
        }
        
        .control-btn {
            padding: 10px 20px;
            background: rgba(255,255,255,0.2);
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .control-btn:hover {
            background: rgba(255,255,255,0.4);
            transform: translateY(-3px);
        }
        
        .footer {
            margin-top: 80px;
            color: rgba(255,255,255,0.7);
            font-size: 0.9rem;
        }
        
        .footer a {
            color: white;
            text-decoration: none;
            font-weight: bold;
        }
        
        .footer a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>3D立体旋转相册</h1>
        
        <div class="photo-album">
            <!-- 照片1 -->
            <div class="photo">
                <img src="https://source.unsplash.com/random/600x400?nature1" alt="自然风景1">
            </div>
            
            <!-- 照片2 -->
            <div class="photo">
                <img src="https://source.unsplash.com/random/600x400?nature2" alt="自然风景2">
            </div>
            
            <!-- 照片3 -->
            <div class="photo">
                <img src="https://source.unsplash.com/random/600x400?nature3" alt="自然风景3">
            </div>
            
            <!-- 照片4 -->
            <div class="photo">
                <img src="https://source.unsplash.com/random/600x400?city1" alt="城市风光1">
            </div>
            
            <!-- 照片5 -->
            <div class="photo">
                <img src="https://source.unsplash.com/random/600x400?city2" alt="城市风光2">
            </div>
            
            <!-- 照片6 -->
            <div class="photo">
                <img src="https://source.unsplash.com/random/600x400?animal1" alt="动物世界1">
            </div>
            
            <!-- 照片7 -->
            <div class="photo">
                <img src="https://source.unsplash.com/random/600x400?animal2" alt="动物世界2">
            </div>
            
            <!-- 照片8 -->
            <div class="photo">
                <img src="https://source.unsplash.com/random/600x400?people1" alt="人物肖像1">
            </div>
            
            <!-- 照片9 -->
            <div class="photo">
                <img src="https://source.unsplash.com/random/600x400?people2" alt="人物肖像2">
            </div>
        </div>
        
        <div class="controls">
            <button class="control-btn" onclick="document.querySelector('.photo-album').style.animationPlayState='paused'">暂停</button>
            <button class="control-btn" onclick="document.querySelector('.photo-album').style.animationPlayState='running'">播放</button>
            <button class="control-btn" onclick="document.querySelector('.photo-album').style.animationDuration='10s'">加速</button>
            <button class="control-btn" onclick="document.querySelector('.photo-album').style.animationDuration='30s'">减速</button>
        </div>
        
        <div class="footer">

        </div>
    </div>
</body>
</html>

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值