Okkkkk
Okkkkk
Okkkkk
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interactive Birthday E-Card</title>
<style>
/* Full-screen container for centering elements */
body, html {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #000;
font-family: Arial, sans-serif;
}
/* Clock styling */
#clock {
position: relative;
width: 200px;
height: 200px;
border: 8px solid #fff;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
background-color: #222;
margin-top: 50px;
opacity: 0;
animation: fadeIn 2s forwards; /* Fade in animation */
}
#hour {
width: 4px;
height: 50px;
background-color: #ffdd00;
}
#minute {
width: 2px;
height: 70px;
background-color: #00ffdd;
}
#second {
width: 1px;
height: 80px;
background-color: #ff0044;
}
/* Fade in effect for clock */
@keyframes fadeIn {
0% { opacity: 0; }
100% { opacity: 1; }
}
/* Calendar styling */
#calendar {
display: none; /* Hidden initially, shown after clock animation */
width: 500px;
padding: 20px;
background-color: #fff;
border-radius: 8px;
text-align: center;
font-size: 18px;
color: #333;
position: relative;
}
.weekdays div {
width: 50px;
}
.crossed {
color: red;
font-size: 20px;
position: absolute;
top: 5px;
left: 5px;
color: red;
font-weight: bold;
}
.crossed::after {
content: 'X';
font-size: 24px;
color: red;
}
/* Crown styling */
.crown {
position: absolute;
top: -30px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 60px;
border: 4px solid gold;
border-radius: 50%;
clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%,
21% 91%, 32% 57%, 2% 35%, 39% 35%);
display: none;
animation: crownOutline 2s forwards;
}
@keyframes crownOutline {
0% { transform: scale(0.5); opacity: 0; }
100% { transform: scale(1); opacity: 1; }
}
.day:hover {
background-color: #e0e0e0;
cursor: pointer;
}
</style>
</head>
<body>
<!-- Clock HTML -->
<div id="clock">
<div id="hour"></div>
<div id="minute"></div>
<div id="second"></div>
</div>
<script>
// Clock Animation
function animateClock() {
const hourHand = document.getElementById("hour");
const minuteHand = document.getElementById("minute");
const secondHand = document.getElementById("second");