5周年edit icon

创建者:
用户3M0qnYRe
Fork(复制)
下载
嵌入
BUG反馈
index.html
style.css
index.js
assets
index.html
            
            <!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>爱在时光里 | 五周年纪念</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background-color: #fffafa;
            color: #333;
            overflow-x: hidden;
            background-image: linear-gradient(to bottom, #fff0f5, #fffafa, #f0f8ff);
            background-attachment: fixed;
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        /* 头部样式 */
        .header {
            text-align: center;
            padding: 60px 20px;
            position: relative;
            overflow: hidden;
            background-image: url('https://source.unsplash.com/random/1600x900/?love,couple');
            background-size: cover;
            background-position: center;
            color: white;
            border-radius: 0 0 50px 50px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }
        
        .overlay {
            background: linear-gradient(135deg, rgba(255,105,180,0.7) 0%, rgba(219,112,147,0.8) 100%);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 极0%;
            z-index: 0;
        }
        
        .header-content {
            position: relative;
            z-index: 2;
            max-width: 800px;
            margin: 0 auto;
        }
        
        .main-title {
            font-size: 4.5rem;
            margin-bottom: 20px;
            font-family: 'Lucida Handwriting', cursive;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
            letter-spacing: 2px;
        }
        
        .sub-title {
            font-size: 1.8rem;
            margin-bottom: 40px;
            font-weight: 300;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
        }
        
        /* 计数器样式 */
        .counters {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 30px;
            margin: 40px 0;
        }
        
        .counter-item {
            background: rgba(255,255,255,0.2);
            border-radius: 15px;
            padding: 20px 30px;
            min-width: 160px;
            text-align: center;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255,255,255,0.3);
            box-shadow: 0 8px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
        }
        
        .counter-item:hover {
            transform: translateY(-10px);
        }
        
        .counter-number {
            font-size: 3rem;
            font-weight: bold;
            margin-bottom: 5px;
            color: white;
            text-shadow: 0 0 10px rgba(255,20,147,0.8);
        }
        
        .counter-label {
            font-size: 1.2rem;
            font-weight: 300;
        }
        
        /* 时间线样式 */
        .section-title {
            font-size: 2.5rem;
            text-align: center;
            color: #db7093;
            margin: 70px 0 40px;
            position: relative;
            font-family: 'Georgia', serif;
        }
        
        .section-title:after {
            content: "";
            display: block;
            width: 100px;
            height: 3px;
            background: linear-gradient(to right, #ff69b4, #ffc0cb);
            margin: 15px auto;
            border-radius: 50px;
        }
        
        .timeline {
            position: relative;
            max-width: 900px;
            margin: 0 auto;
            padding: 50px 0;
        }
        
        .timeline::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            width: 6px;
            height: 100%;
            background: linear-gradient(to bottom, #ff69b4, #ffc0cb);
            border-radius: 3px;
            transform: translateX(-50%);
        }
        
        .timeline-item {
            display: flex;
            margin-bottom: 60px;
            position: relative;
        }
        
        .timeline-item:nth-child(even) {
            flex-direction: row-reverse;
        }
        
        .timeline-content {
            background: white;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            width: calc(50% - 60px);
            position: relative;
            z-index: 1;
        }
        
        .timeline-item:nth-child(odd) .timeline-content {
            margin-left: 60px;
        }
        
        .timeline-item:nth-child(even) .timeline-content {
            margin-right: 60px;
        }
        
        .timeline-content::before {
            content: '';
            position: absolute;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #ff69b4;
            top: 20px;
        }
        
        .timeline-item:nth-child(odd) .timeline-content::before {
            left: -65px;
        }
        
        .timeline-item:nth-child(even) .timeline-content::before {
            right: -65px;
        }
        
        .timeline-year {
            font-size: 1.8rem;
            color: #ff69b4;
            margin-bottom: 15px;
            font-family: 'Georgia', serif;
        }
        
        .timeline-title {
            font-size: 1.5rem;
            color: #333;
            margin-bottom: 15px;
        }
        
        .timeline-description {
            color: #666;
            margin-bottom: 15px;
        }
        
        .timeline-image {
            width: 100%;
            height: 200px;
            border-radius: 15px;
            object-fit: cover;
            margin-top: 15px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.1);
        }
        
        /* 照片墙样式 */
        .photo-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 50px;
        }
        
        .photo-item {
            border-radius: 15px;
            overflow: hidden;
            height: 250px;
            position: relative;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        
        .photo-item:hover {
            transform: translateY(-10px) scale(1.03);
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        }
        
        .photo-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
        
        .photo-item:hover img {
            transform: scale(1.1);
        }
        
        /* 情书样式 */
        .love-letter {
            background: linear-gradient(135deg, #fff0f5 0%, #f0f8ff 100%);
            padding: 60px;
            border-radius: 20px;
            margin: 80px auto;
            max-width: 900px;
            position: relative;
            box-shadow: 0 5px 30px rgba(0,0,0,0.1);
            overflow: hidden;
            border: 1px solid rgba(255,105,180,0.2);
        }
        
        .love-letter::before {
            content: "";
            position: absolute;
            top: 20px;
            left: 20px;
            right: 20px;
            bottom: 20px;
            border: 1px dashed rgba(219,112,147,0.5);
            border-radius: 10px;
            pointer-events: none;
        }
        
        .letter-content {
            font-size: 1.2rem;
            line-height: 2;
            color: #555;
            font-family: 'Georgia', serif;
            position: relative;
            z-index: 2;
        }
        
        .letter-content p {
            margin-bottom: 20px;
        }
        
        .signature {
            text-align: right;
            font-family: 'Lucida Handwriting', cursive;
            font-size: 1.5rem;
            color: #db7093;
            margin-top: 30px;
        }
        
        /* 纪念日部分 */
        .anniversary-section {
            background: url('https://source.unsplash.com/random/1600x900/?love,anniversary') center/cover no-repeat;
            min-height: 500px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
            margin: 80px auto;
        }
        
        .anniversary-overlay {
            background: rgba(0,0,0,0.4);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
        }
        
        .anniversary-content {
            text-align: center;
            color: white;
            max-width: 700px;
            padding: 40px;
            position: relative;
            z-index: 2;
        }
        
        .anniversary-title {
            font-size: 3.5rem;
            font-family: 'Lucida Handwriting', cursive;
            margin-bottom: 20px;
            text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
        }
        
        .anniversary-date {
            font-size: 1.8rem;
            margin-bottom: 30px;
            font-weight: 300;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
        }
        
        /* 页脚样式 */
        .footer {
            text-align: center;
            padding: 40px;
            background: linear-gradient(135deg, #ff69b4 0%, #db7093 100%);
            color: white;
            border-radius: 50px 50px 0 0;
            margin-top: 80px;
        }
        
        .footer-title {
            font-size: 2.2rem;
            margin-bottom: 20px;
            font-family: 'Georgia', serif;
        }
        
        .future-promise {
            max-width: 600px;
            margin: 0 auto;
            font-size: 1.2rem;
            font-style: italic;
        }
        
        .heart-beat {
            font-size: 3rem;
            display: inline-block;
            margin: 20px 0;
            animation: beat 1s infinite;
        }
        
        @keyframes beat {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }
        
        /* 响应式设计 */
        @media (max-width: 992px) {
            .main-title {
                font-size: 3.5rem;
            }
            
            .counter-item {
                padding: 15px 20px;
                min-width: 120px;
            }
            
            .counter-number {
                font-size: 2.5rem;
            }
        }
        
        @media (max-width: 768px) {
            .timeline::before {
                left: 10px;
            }
            
            .timeline-item, .timeline-item:nth-child(even) {
                flex-direction: column;
                margin-bottom: 40px;
            }
            
            .timeline-content {
                width: calc(100% - 60px);
                margin-left: 60px !important;
                margin-right: 0 !important;
            }
            
            .timeline-content::before {
                left: -65px !important;
                right: auto;
            }
            
            .love-letter {
                padding: 30px;
            }
        }
        
        @media (max-width: 576px) {
            .main-title {
                font-size: 2.8rem;
            }
            
            .counters {
                gap: 15px;
            }
            
            .counter-item {
                min-width: 100px;
                padding: 10px 15px;
            }
            
            .counter-number {
                font-size: 2rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 头部 -->
        <header class="header">
            <div class="overlay"></div>
            <div class="header-content">
                <h1 class="main-title">我们的五周年</h1>
                <p class="sub-title">时间不会消磨感情,只会让它沉淀为永恒</p>
                
                <div class="counters">
                    <div class="counter-item">
                        <div class="counter-number">1825</div>
                        <div class="counter-label">共同度过的日子</div>
                    </div>
                    <div class="counter-item">
                        <div class="counter-number">60</div>
                        <div class="counter-label">美好的月份</div>
                    </div>
                    <div class="counter-item">
                        <div class="counter-number">5</div>
                        <div class="counter-label">璀璨的年华</div>
                    </div>
                </div>
            </div>
        </header>
        
        <!-- 时间线部分 -->
        <h2 class="section-title">五年的美好旅程</h2>
        <div class="timeline">
            <div class="timeline-item">
                <div class="timeline-content">
                    <h3 class="timeline-year">第一年 · 相遇</h3>
                    <h4 class="timeline-title">美好的开始</h4>
                    <p class="timeline-description">那个夏天,我们像两颗行星彼此吸引。第一次约会时紧张的心情,第一次牵手的甜蜜,永远铭记。</p>
                    <img src="./assets/蜗牛.svg" alt="第一年" class="timeline-image">
                </div>
            </div>
            
            <div class="timeline-item">
                <div class="timeline-content">
                    <h3 class="timeline-year">第二年 · 相知</h3>
                    <h4 class="timeline-title">发现彼此</h4>
                    <p class极="timeline-description">我们一起克服困难,互相支持追求梦想。</p>
                    <img src="./assets/抱抱枕的小熊.svg" alt="第二年" class="timeline-image">
                </div>
            </div>
            
            <div class="timeline-item">
                <div class="timeline-content">
                    <h3 class="timeline-year">第三年 · 承诺</h3>
                    <h4 class="timeline-title">共同成长</h4>
                    <p class="timeline-description">我们一起旅行,探索世界,也探索彼此的内心。争吵后拥抱更紧,彼此分享梦想。</p>
                    <img src="./assets/奶牛.svg" alt="第三年" class="timeline-image">
                </div>
            </div>
            
            <div class="timeline-item">
                <div class="timeline-content">
                    <h3 class="timeline-year">第四年 · 安定</h3>
                    <h4 class="timeline-title">家的温暖</h4>
                    <p class="timeline-description">我们在平凡中创造非凡的幸福。每一个清晨的早安都有爱的温度。</p>
                    <img src="./assets/可爱小黄狗.svg" alt="第四年" class="timeline-image">
                </div>
            </div>
            
            <div class="timeline-item">
                <div class="timeline-content">
                    <h3 class="timeline-year">第五年 · 深爱</h3>
                    <h4 class="timeline-title">爱已成永恒</h4>
                    <p class="timeline-description">五年时光磨砺出璀璨的感情宝石,每一次回忆都珍贵无比,未来更是令人期待。</p>
                    <img src="./assets/可爱熊猫.svg" alt="第五年" class="timeline-image">
                </div>
            </div>
        </div>
        
        <!-- 照片墙 -->
        <h2 class="section-title">美好瞬间</h2>
        <div class="photo-grid">
            <div class="photo-item">
                <img src="./assets/1.jpg" alt="美好瞬间">
            </div>
            <div class="photo-item">
                <img src="./assets/IMG_20210814_132024_compressed.jpg" alt="美好瞬间">
            </div>
            <div class="photo-item">
                <img src="./assets/mmexport1683972167015.jpg" alt="美好瞬间">
            </div>
            <div class="photo-item">
                <img src="./assets/mmexport1707307131099.jpg" alt="美好瞬间">
            </div>
            <div class="photo-item">
                <img src="./assets/mmexport1707483687949_compressed.jpg" alt="美好瞬间">
            </div>
            <div class="photo-item">
                <img src="./assets/mmexport1724146848168.jpg" alt="美好瞬间">
            </div>
        </div>
        
        <!-- 情书部分 -->
        <div class="love-letter">
            <div class="letter-content">
                <p>亲爱的:姗姗</p>
                <p>五年前的今天,我们相遇了,那一刻我的人生开始有了不一样的意义。</p>
                <p>1825个日日夜夜,我们从相遇到相知,从相识到相爱,从热恋到相守。每一次回忆都让我更加确信,与你相伴是我这一生最美的决定。</p>
                <p>谢谢你在我失意时给我的拥抱,在我迷茫时指引我方向;谢谢你分享我的快乐,分担我的忧愁;谢谢你包容我的不完美,让我成为更好的自己。</p>
                <p>五年时光,让爱情沉淀成了生命的一部分。你的微笑是我疲惫时的慰藉,你的话语是我黑暗中的灯塔。</p>
                <p>在这个特殊的日子里,我想告诉你:每一天与你相伴都是恩赐,每一刻因你而存在都是幸福。</p>
                <p>未来的日子里,让我们一起经历人生更多的五年,一起创造更多珍贵的回忆。</p>
                <p class="signature">永远爱你的志远</p>
            </div>
        </div>
        
        <!-- 纪念日部分 -->
        <div class="anniversary-section">
            <div class="anniversary-overlay"></div>
            <div class="anniversary-content">
                <h2 class="anniversary-title">五周年纪念日</h2>
                <p class="anniversary-date">2020.6.27 - 2025.6.27</p>
                <p class="future-promise">五年不是终点,而是爱的里程碑<br>未来的每一天,我都想与你一起走过</p>
            </div>
        </div>
    </div>
    
    <!-- 页脚 -->
    <footer class="footer">
        <div class="footer-title">一生挚爱</div>
        <div class="heart-beat">❤️</div>
        <p class="future-promise">时间会证明,真爱能超越一切<br>我们的故事仍在继续,每一页都会比上一页更加精彩</p>
    </footer>
    
    <script>
        // 添加一些简单的动画效果
        document.addEventListener('DOMContentLoaded', function() {
            // 计数器效果
            const counters = document.querySelectorAll('.counter-number');
            const speed = 300;
            
            counters.forEach(counter => {
                const updateCount = () => {
                    const target = +counter.innerHTML;
                    const count = +counter.innerText;
                    
                    const inc = target / speed;
                    
                    if(count < target) {
                        counter.innerText = Math.ceil(count + inc);
                        setTimeout(updateCount, 1);
                    } else {
                        counter.innerText = target;
                    }
                }
                
                updateCount();
            });
            
            // 页面滚动效果
            window.addEventListener('scroll', function() {
                const elements = document.querySelectorAll('.timeline-content, .photo-item, .love-letter, .anniversary-section');
                
                elements.forEach(el => {
                    const elementTop = el.getBoundingClientRect().top;
                    const windowHeight = window.innerHeight;
                    
                    if(elementTop < windowHeight * 0.8) {
                        el.style.opacity = "1";
                        el.style.transform = "translateY(0)";
                    }
                });
            });
        });
    </script>
</body>
</html>
        
编辑器加载中
预览
控制台