<html>
<head>
<style>
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f4f4f4;
}
.clock {
width: 300px;
height: 300px;
border: 10px solid #333;
border-radius: 50%;
position: relative;
background-color: #fff;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}
.number {
position: absolute;
font-size: 18px;
font-weight: bold;
color: #333;
}
.number-12 { top: 10px; left: 50%; transform: translateX(-50%); }
.number-3 { top: 50%; right: 10px; transform: translateY(-50%); }
.number-6 { bottom: 10px; left: 50%; transform: translateX(-50%); }
.number-9 { top: 50%; left: 10px; transform: translateY(-50%); }
.hand {
position: absolute;
background-color: #333;
transform-origin: bottom center;
left: 50%;
bottom: 50%;
transform: translateX(-50%);
}
.hour-hand {
width: 6px;
height: 70px;
top: 80px;
background-color: #333;
}
.minute-hand {
width: 4px;
height: 100px;
top: 50px;
background-color: #666;
}
.second-hand {
width: 2px;
height: 120px;
top: 30px;
background-color: #ff0000;
animation: rotate 60s linear infinite;
}
@keyframes rotate {
from { transform: translateX(-50%) rotate(0deg); }
to { transform: translateX(-50%) rotate(360deg); }
}
</style>
.clock {
width: 300px;
height: 300px;
border: 10px solid #333;
border-radius: 50%;
position: relative;
background-color: #fff;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}
.number {
position: absolute;
font-size: 18px;
font-weight: bold;
color: #333;
}
.number-12 { top: 10px; left: 50%; transform: translateX(-50%); }
.number-3 { top: 50%; right: 10px; transform: translateY(-50%); }
.number-6 { bottom: 10px; left: 50%; transform: translateX(-50%); }
.number-9 { top: 50%; left: 10px; transform: translateY(-50%); }
.hand {
position: absolute;
background-color: #333;
transform-origin: bottom center;
left: 50%;
bottom: 50%;
transform: translateX(-50%);
}
.hour-hand {
width: 6px;
height: 70px;
top: 80px;
background-color: #333;
}
.minute-hand {
width: 4px;
height: 100px;
top: 50px;
background-color: #666;
}
.second-hand {
width: 2px;
height: 120px;
top: 30px;
background-color: #ff0000;
animation: rotate 60s linear infinite;
}
@keyframes rotate {
from { transform: translateX(-50%) rotate(0deg); }
to { transform: translateX(-50%) rotate(360deg); }
}
</style>
</head>
<body>
<div class="clock">
<div class="number number-12">12</div>
<div class="number number-3">3</div>
<div class="number number-6">6</div>
<div class="number number-9">9</div>
<div class="hand hour-hand"></div>
<div class="hand minute-hand"></div>
<div class="hand second-hand"></div>
</div>
</body>
</html>