-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclockstyle.css
More file actions
80 lines (78 loc) · 1.7 KB
/
clockstyle.css
File metadata and controls
80 lines (78 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
body{
box-sizing: border-box;
font-size: 30px;
font-family: Arial, Helvetica, sans-serif;
background: linear-gradient(to right , blue ,skyblue);
--rotation: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.clock{
border-radius: 50%;
background-color: rgba(255,255,255,0.8);
height: 400px;
width: 400px;
border: solid 5px black ;
position: relative;
}
.number{
position:absolute;
width: 100%;
height: 100%;
text-align: center;
transform: rotate(var(--rotation));
}
.number1{--rotation:30deg;}
.number2{--rotation:60deg;}
.number3{--rotation:90deg;}
.number4{--rotation:120deg;}
.number5{--rotation:150deg;}
.number6{--rotation:180deg;}
.number7{--rotation:210deg;}
.number8{--rotation:240deg;}
.number9{--rotation:270deg;}
.number10{--rotation:300deg;}
.number11{--rotation:330deg;}
.clock::after{
content: "";
position: absolute;
height: 15px;
width: 15px;
background-color: black;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
border-radius: 50%;
z-index: 11;
}
.hand{
position:absolute;
bottom: 50%;
left: 50%;
height: 50%;
width: 10px;
background-color: black;
transform-origin: bottom;
transform: translateX(-50%);
border-top-left-radius: 5px;
border-top-right-radius: 5px;
z-index: 10;
transform: rotate(calc(var(--rotation) * 1deg));
}
.second{
height: 40%;
background-color: red;
height: 42%;
width: 3px;
}
.minute{
height: 30%;
width:5px;
background-color: black;
}
.hour{
height:20%;
width: 7px;
}