Meta Description" name="description" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sorry Baby ❤️</title>
<style>
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
background: linear-gradient(135deg, #c9b6ff, #f5d0ff);
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.card {
background: white;
padding: 25px;
border-radius: 20px;
text-align: center;
width: 320px;
box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
img {
width: 220px;
height: 220px;
object-fit: cover;
border-radius: 14px;
}
h2 {
margin-top: 18px;
color: #444;
min-height: 70px;
}
button {
margin-top: 15px;
padding: 10px 22px;
border: none;
border-radius: 12px;
background: #b8a6ff;
color: white;
font-size: 15px;
cursor: pointer;
}
.choices {
display: none;
margin-top: 15px;
gap: 10px;
justify-content: center;
}
.yes {
background: #7ed957;
}
.no {
background: #ff6b6b;
position: relative;
}
</style>
</head>
<body>
<div class="card">
<img id="image" src="pic1.jpg" />
<h2 id="text">Hey baby</h2>
<button id="nextBtn" onclick="nextSlide()">Tap me</button>
<div class="choices" id="choices">
<button class="yes" onclick="nextSlide()">Yes ❤️</button>
<button class="no" id="noBtn">No 😭</button>
</div>
</div>
<!-- MUSIC -->
<audio autoplay loop>
<source src="music.mp3" type="audio/mpeg">
</audio>
<script>
const slides = [
{ img: "pic1.jpg", text: "Hey baby" },
{ img: "pic2.jpg", text: "Do you still love me?" },
{ img: "pic3.jpg", text: "Are you still mad at me?" },
{ img: "pic4.jpg", text: "Do you want us to continue?" },
{ img: "pic5.jpg", text: "Are you tired of me?" },
{ img: "pic6.jpg", text: "I know I made a lot of mistakes." },
{ img: "pic7.jpg", text: "I hurt you. I disappointed you." },
{ img: "pic8.jpg", text: "I’m not making excuses. I just want to fix things." },
{ img: "pic9.jpg", text: "I still choose you. I still love you." },
{ img: "pic10.jpg", text: "Valentine’s Day is almost here 🌹\nCan you be my Valentine?\n\nI love you. I’m sorry." }
];
let index = 0;
function nextSlide() {
index++;
if (index >= slides.length) return;
document.getElementById("image").src = slides[index].img;
document.getElementById("text").innerText = slides[index].text;
if (index >= 1 && index <= 4 || index === 9) {
document.getElementById("choices").style.display = "flex";
document.getElementById("nextBtn").style.display = "none";
} else {
document.getElementById("choices").style.display = "none";
document.getElementById("nextBtn").style.display = "inline-block";
}
}
// moving NO button
const noBtn = document.getElementById("noBtn");
noBtn.addEventListener("mouseover", () => {
const x = Math.random() * 150 - 75;
const y = Math.random() * 150 - 75;
noBtn.style.transform = `translate(${x}px, ${y}px)`;
});
</script>
</body>
</html>3
1
4KB
4KB
212.0ms
232.0ms
344.0ms