Created
January 26, 2026 03:15
-
-
Save neel470/fea81d7b24a8aa8fd3000e4802737f1c to your computer and use it in GitHub Desktop.
Untitled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>For Sreya ❤️</title> | |
| <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Poppins:wght@300;400&display=swap" rel="stylesheet"> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body> | |
| <div class="card" id="card"> | |
| <h1>Hi Sreya ❤️</h1> | |
| <p> | |
| Some people become special without trying,<br> | |
| and somehow… you became one of them. | |
| </p> | |
| <p class="love"> | |
| And yes… I love you.<br> | |
| More than words can explain ❤️ | |
| </p> | |
| <h2>Will you be mine?</h2> | |
| <div class="buttons"> | |
| <button id="yes">Yes 💖</button> | |
| <button id="no">No 😭</button> | |
| </div> | |
| </div> | |
| <script src="script.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const noBtn = document.getElementById("no"); | |
| const yesBtn = document.getElementById("yes"); | |
| const card = document.getElementById("card"); | |
| let noClicks = 0; | |
| // No button logic (4 clicks then vanish) | |
| noBtn.addEventListener("click", () => { | |
| noClicks++; | |
| if (noClicks < 4) { | |
| const x = Math.random() * 120 - 60; | |
| const y = Math.random() * 80 - 40; | |
| noBtn.style.transform = `translate(${x}px, ${y}px)`; | |
| } else { | |
| noBtn.style.display = "none"; | |
| const msg = document.createElement("p"); | |
| msg.innerHTML = "😭 Only one choice left 😌"; | |
| msg.style.marginTop = "15px"; | |
| card.appendChild(msg); | |
| } | |
| }); | |
| // Yes button ❤️ | |
| yesBtn.addEventListener("click", () => { | |
| card.innerHTML = ` | |
| <h1>I Love You ❤️</h1> | |
| <h2>I knew it 💕</h2> | |
| <p> | |
| Thank you for choosing me.<br><br> | |
| I’ll always choose you. | |
| </p> | |
| `; | |
| showCat(); | |
| }); | |
| // Cat animation function 🐱 | |
| function showCat() { | |
| const cat = document.createElement("div"); | |
| cat.className = "cat"; | |
| cat.innerHTML = "🐱"; | |
| const heart = document.createElement("div"); | |
| heart.className = "heart"; | |
| heart.innerHTML = "❤️"; | |
| document.body.appendChild(cat); | |
| document.body.appendChild(heart); | |
| setTimeout(() => { | |
| cat.remove(); | |
| heart.remove(); | |
| }, 6000); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * { | |
| box-sizing: border-box; | |
| } | |
| body { | |
| margin: 0; | |
| height: 100vh; | |
| font-family: 'Poppins', sans-serif; | |
| background: linear-gradient(135deg, #ffafbd, #ffc3a0); | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| overflow: hidden; | |
| } | |
| .card { | |
| background: rgba(255,255,255,0.25); | |
| backdrop-filter: blur(15px); | |
| padding: 45px; | |
| max-width: 420px; | |
| width: 90%; | |
| border-radius: 20px; | |
| text-align: center; | |
| box-shadow: 0 20px 40px rgba(0,0,0,0.15); | |
| } | |
| h1 { | |
| font-family: 'Playfair Display', serif; | |
| } | |
| h2 { | |
| color: #ff2e63; | |
| } | |
| p { | |
| font-size: 15px; | |
| line-height: 1.6; | |
| } | |
| .love { | |
| color: #d90429; | |
| font-weight: 500; | |
| margin: 15px 0; | |
| } | |
| .buttons { | |
| margin-top: 25px; | |
| display: flex; | |
| justify-content: center; | |
| gap: 15px; | |
| position: relative; | |
| } | |
| button { | |
| padding: 12px 28px; | |
| border: none; | |
| border-radius: 30px; | |
| font-size: 16px; | |
| cursor: pointer; | |
| transition: 0.3s ease; | |
| } | |
| #yes { | |
| background: #ff2e63; | |
| color: white; | |
| } | |
| #yes:hover { | |
| transform: scale(1.1); | |
| } | |
| #no { | |
| background: #e0e0e0; | |
| position: relative; | |
| } | |
| /* Cat animation */ | |
| .cat { | |
| font-size: 40px; | |
| position: fixed; | |
| bottom: 20px; | |
| left: -60px; | |
| animation: catRun 6s linear infinite; | |
| } | |
| @keyframes catRun { | |
| 0% { left: -60px; } | |
| 50% { left: 50%; } | |
| 100% { left: 110%; } | |
| } | |
| .heart { | |
| font-size: 30px; | |
| position: fixed; | |
| bottom: 30px; | |
| left: 50%; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment