Untitled
unknown
plain_text
8 months ago
1.5 kB
3
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Swipe Message</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #ffe4e1;
font-family: Arial, sans-serif;
text-align: center;
user-select: none;
overflow: hidden;
}
.container {
width: 80%;
max-width: 400px;
padding: 20px;
background: white;
border-radius: 15px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
transition: transform 0.5s ease-in-out;
}
.message {
font-size: 24px;
font-weight: bold;
color: #ff1493;
}
</style>
</head>
<body>
<div class="container" id="swipeBox">
<p class="message" id="message">You are my favourite sister</p>
</div>
<script>
let swipeBox = document.getElementById("swipeBox");
let message = document.getElementById("message");
swipeBox.addEventListener("touchstart", function (e) {
swipeBox.style.transform = "translateX(-100vw)";
setTimeout(() => {
message.innerHTML = "You are my love 😙😘❤️";
swipeBox.style.transform = "translateX(0)";
}, 500);
});
</script>
</body>
</html>
Editor is loading...
Leave a Comment