116 lines
No EOL
1.7 KiB
CSS
116 lines
No EOL
1.7 KiB
CSS
body {
|
|
background-color: #e5e5e5;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.clock {
|
|
width: 300px;
|
|
height: 300px;
|
|
background-color: #adadad;
|
|
border-radius: 50%;
|
|
border: 2px solid #000000;
|
|
position: relative;
|
|
}
|
|
|
|
.clock .hands {
|
|
--rotation: 0;
|
|
position: absolute;
|
|
bottom: 50%;
|
|
left: 50%;
|
|
transform-origin: bottom;
|
|
transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
|
|
}
|
|
|
|
.clock .hands.hrs {
|
|
width: 6px;
|
|
height: 25%;
|
|
background-color: #000000;
|
|
}
|
|
|
|
.clock .hands.min {
|
|
width: 4px;
|
|
height: 37%;
|
|
background-color: #000000;
|
|
}
|
|
|
|
.clock .hands.sek {
|
|
width: 2px;
|
|
height: 42%;
|
|
background-color: #ff0000;
|
|
border-top-left-radius: 40%;
|
|
border-top-right-radius: 40%;
|
|
}
|
|
|
|
.clock .dot {
|
|
position: absolute;
|
|
background-color: #000000;
|
|
width: 10px;
|
|
height: 10px;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
border-radius: 50%;
|
|
border: 2px solid #ff0000;
|
|
z-index: 10;
|
|
}
|
|
|
|
.clock .nums {
|
|
--rotation: 0;
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
text-align: center;
|
|
transform: rotate(var(--rotation));
|
|
font-size: medium;
|
|
}
|
|
|
|
.clock .n01 {
|
|
--rotation: 30deg;
|
|
}
|
|
|
|
.clock .n02 {
|
|
--rotation: 60deg;
|
|
}
|
|
|
|
.clock .n03 {
|
|
--rotation: 90deg;
|
|
}
|
|
|
|
.clock .n04 {
|
|
--rotation: 120deg;
|
|
}
|
|
|
|
.clock .n05 {
|
|
--rotation: 150deg;
|
|
}
|
|
|
|
.clock .n06 {
|
|
--rotation: 180deg;
|
|
}
|
|
|
|
.clock .n07 {
|
|
--rotation: 210deg;
|
|
}
|
|
|
|
.clock .n08 {
|
|
--rotation: 240deg;
|
|
}
|
|
|
|
.clock .n09 {
|
|
--rotation: 270deg;
|
|
}
|
|
|
|
.clock .n10 {
|
|
--rotation: 300deg;
|
|
}
|
|
|
|
.clock .n11 {
|
|
--rotation: 330deg;
|
|
}
|
|
|
|
.clock .n12 {
|
|
--rotation: 360deg;
|
|
} |