-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
93 lines (89 loc) · 2.04 KB
/
style.css
File metadata and controls
93 lines (89 loc) · 2.04 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
81
82
83
84
85
86
87
88
89
90
91
92
93
*,*::after,*::before{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}
body{
background:#091921;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
overflow: hidden;
}
.clock{
height: 300px;
width: 300px;
background:#091921;
border-radius: 50%;
border:3.7px solid #091921;
position: relative;
box-shadow: 0 -15px 15px rgba(255,255,255,0.05),
inset 0 -15px 15px rgba(255,255,255,0.05),
0 15px 15px rgba(255,255,255,0.05),
inset 0 15px 15px rgba(0,0,0,0.3);
}
.clock .number{
padding: 7px;
color: white;
--rotation:0;
position: absolute;
width: 100%;
height: 100%;
text-align: center;
font-size: 1.3rem;
font-weight: bold;
transform: rotate(var(--rotation));
}
.clock .number1{--rotation:30deg}
.clock .number2{--rotation:60deg}
.clock .number3{--rotation:90deg}
.clock .number4{--rotation:120deg}
.clock .number5{--rotation:150deg}
.clock .number6{--rotation:180deg}
.clock .number7{--rotation:210deg}
.clock .number8{--rotation:240deg}
.clock .number9{--rotation:270deg}
.clock .number10{--rotation:300deg}
.clock .number11{--rotation:330deg}
.clock .hand{
--rotation:0;
position: absolute;
bottom:50%;
left: 50%;
border-radius: 1px solid white;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
background-color: black;
transform-origin: bottom;
transform:translateX(-50%) rotate(calc(var(--rotation)*1deg));
z-index: 10;
}
.clock::after{
content: '';
position: absolute;
z-index: 11;
background-color: rgb(255, 255, 255);
border-radius: 50%;
width: 13px;
height: 13px;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
.clock .hand.sec{
width: 3px;
height: 45%;
background-color: red;
}
.clock .hand.min{
width: 7px;
height: 38%;
background-color: black;
}
.clock .hand.hour{
width: 8px;
height: 30%;
background-color: #a41147;
}