html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Love Confession 💕</title>
</head>
<body>
<div class="heart-container"></div>
<div class="container">
<h1>💕 My Love Confession 💕</h1>
<p>You are the reason my world is full of love and joy. Every moment with you is a beautiful memory. I love you more than words can express. 💖</p>
<button class="btn" onclick="showMessage()">Click for a Surprise!</button>
<p id="surprise" style="display:none; font-size: 20px; color: #d6336c; margin-top: 10px; font-weight: bold;">You are my forever love! ❤️</p>
</div>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #ffccd5;
font-family: 'Arial', sans-serif;
text-align: center;
overflow: hidden;
position: relative;
}
.container {
background: white;
padding: 20px;
border-radius: 15px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
max-width: 400px;
z-index: 2;
}
h1 {
color: #d6336c;
}
p {
font-size: 18px;
color: #333;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function showMessage() {
document.getElementById("surprise").style.display = "block";
}
function createHeart() {
const heart = document.createElement("div");
heart.classList.add("floating-heart");
heart.innerHTML = "❤️";
document.querySelector(".heart-container").appendChild(heart);
heart.style.left = Math.random() * 100 + "vw";
heart.style.animationDuration = Math.random() * 3 + 2 + "s";
setTimeout(() => { heart.remove(); }, 5000);
}
setInterval(createHeart, 500);
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run