大数跨境
0
0

IT狗的表白网页(html)

IT狗的表白网页(html) 橙子好甜
2025-06-25
1
导读:网上看到了很多表白网页,整一个,IT狗的浪漫!
网上看到了很多表白网页,整一个,IT狗的浪漫!
效果图
实例
<!DOCTYPE html><html lang="zh"><head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <title>给最爱的你</title>    <style>        body {            margin0;            padding0;            height100vh;            display: flex;            justify-content: center;            align-items: center;            background#000;            overflow: hidden;            font-family'Arial', sans-serif;        }
        .container {            text-align: center;            z-index1;            color#fff;        }
        h1 {            font-size3em;            margin-bottom20px;            text-shadow0 0 10px #ff69b4;            animation: glow 2s infinite alternate;        }
        p {            font-size1.5em;            line-height1.6;            max-width600px;            margin0 auto 30px;        }
        .btn {            display: inline-block;            padding15px 30px;            background#ff69b4;            color: white;            text-decoration: none;            border-radius50px;            font-size1.2em;            transition: all 0.3s;            border2px solid #ff69b4;        }
        .btn:hover {            background: transparent;            color#ff69b4;            transformscale(1.1);        }
        .heart {            position: absolute;            pointer-events: none;            animation: animate 6s linear;        }
        @keyframes animate {            0% {                transformtranslateY(0rotate(0deg);                opacity1;            }            100% {                transformtranslateY(-1000pxrotate(720deg);                opacity0;            }        }
        @keyframes glow {            from {                text-shadow0 0 10px #ff69b4;            }            to {                text-shadow0 0 20px #ff69b40 0 30px #ff1493;            }        }
        .hidden {            display: none;        }
        #response {            margin-top30px;            font-size2em;            color#ff69b4;        }    </style></head><body>    <div class="container">        <h1>亲爱的 [她的名字]</h1>        <p>从遇见你的那一刻起,我的心就被你偷走了。<br>           你的笑容是我每天最期待的风景,<br>           你的声音是我听过最动听的旋律。<br>           我想和你一起走过每一个春夏秋冬。</p>
        <div id="question">            <p>你愿意做我的女朋友吗?</p>            <a href="#" class="btn" id="yes-btn">愿意</a>            <a href="#" class="btn" id="no-btn">再考虑考虑</a>        </div>
        <div id="response" class="hidden"></div>    </div>
    <script>        // 创建爱心        function createHeart() {            const heart = document.createElement('div');            heart.classList.add('heart');
            heart.innerHTML = '❤️';            heart.style.left = Math.random() * 100 + 'vw';            heart.style.fontSize = Math.random() * 30 + 10 + 'px';            heart.style.animationDuration = Math.random() * 3 + 3 + 's';
            document.body.appendChild(heart);
            setTimeout(() => {                heart.remove();            }, 6000);        }
        // 定时生成爱心        setInterval(createHeart, 300);
        // 按钮事件        document.getElementById('yes-btn').addEventListener('click'function(e) {            e.preventDefault();            document.getElementById('question').classList.add('hidden');            document.getElementById('response').classList.remove('hidden');            document.getElementById('response').innerHTML = '❤️ 太好了!我爱你! ❤️';
            // 加速爱心生成            clearInterval(heartInterval);            setInterval(createHeart, 100);        });
        document.getElementById('no-btn').addEventListener('click'function(e) {            e.preventDefault();            this.style.position = 'absolute';            const x = Math.random() * (window.innerWidth - 100);            const y = Math.random() * (window.innerHeight - 50);            this.style.left = x + 'px';            this.style.top = y + 'px';        });
        let heartInterval = setInterval(createHeart, 300);    </script></body></html>

【声明】内容源于网络
0
0
橙子好甜
人生苦短,我用python --it测试狗
内容 30
粉丝 0
橙子好甜 人生苦短,我用python --it测试狗
总阅读32
粉丝0
内容30