Untitled
unknown
plain_text
7 months ago
1.3 kB
5
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Happy Eid</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: black;
color: white;
font-size: 24px;
font-family: Arial, sans-serif;
}
.code {
font-family: monospace;
white-space: pre;
text-align: center;
}
</style>
</head>
<body>
<div class="code" id="code"></div>
<script>
let codeText = `function EidMubarak() {
console.log("Eid Mubarak to Everyone!");
}
EidMubarak();`;
let index = 0;
let codeElement = document.getElementById("code");
function typeCode() {
if (index < codeText.length) {
codeElement.innerHTML += codeText.charAt(index);
index++;
setTimeout(typeCode, 100);
} else {
setTimeout(() => {
codeElement.innerHTML += "<br><br>🎉 Happy EID Day! 🎉";
}, 1000);
}
}
typeCode();
</script>
</body>
</html>Editor is loading...
Leave a Comment