<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>A Sweet Surprise 🍫</title>
<style>
body{
margin:0;
font-family:Arial,sans-serif;
background:linear-gradient(135deg,#ff9a9e,#fad0c4);
display:flex;
justify-content:center;
align-items:center;
height:100vh;
text-align:center;
overflow:hidden;
}
.card{
background:white;
padding:30px;
border-radius:20px;
box-shadow:0 10px 30px rgba(0,0,0,.2);
max-width:350px;
}
button{
background:#ff4d6d;
color:white;
border:none;
padding:12px 25px;
border-radius:30px;
font-size:18px;
cursor:pointer;
margin-top:20px;
}
#secret{
display:none;
margin-top:20px;
font-size:20px;
color:#d63384;
font-weight:bold;
animation:fade 1.5s;
}
@keyframes fade{
from{opacity:0;transform:scale(.8);}
to{opacity:1;transform:scale(1);}
}
.heart{
position:absolute;
color:red;
font-size:25px;
animation:float 5s linear infinite;
}
@keyframes float{
0%{transform:translateY(100vh);}
100%{transform:translateY(-100px);}
}
</style>
</head>
<body>
<div class="card">
<h1>🍫 A Chocolate Just for You</h1>
<p>There's a secret hidden inside...</p>
<button onclick="showSecret()">Open My Heart ❤️</button>
<div id="secret">
💖 Every chocolate is sweet,<br><br>
But nothing is sweeter than YOU.<br><br>
Thank you for being my happiness.<br><br>
❤️ I Love You Forever ❤️
</div>
</div>
<script>
function showSecret(){
document.getElementById("secret").style.display="block";
}
setInterval(()=>{
const heart=document.createElement("div");
heart.className="heart";
heart.innerHTML="❤️";
heart.style.left=Math.random()*100+"vw";
heart.style.animationDuration=(Math.random()*3+3)+"s";
document.body.appendChild(heart);
setTimeout(()=>heart.remove(),6000);
},300);
</script>
</body>
</html>
Comments
Post a Comment