-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
131 lines (117 loc) · 2.55 KB
/
style.css
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
@import url('https://fonts.googleapis.com/css2?family=Karla:wght@300;400;500;600;700&display=swap');
* {
box-sizing: border-box;
}
:root {
--primary-color: #FFFFFF;
--secondary-color: #303F9F;
--text-color: #607D8B;
}
body.dark {
--primary-color: #303F9F;
--secondary-color: #607D8B;
--text-color: #FFFFFF;
}
body {
position: relative;
font-family: 'Karla', sans-serif;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
margin: 0;
height: 100vh;
background-color: var(--primary-color);
transition: all 0.3s ease-in;
}
h1 {
color: var(--text-color);
font-weight: 300;
font-size: 40px;
text-transform: uppercase;
margin-top: 40px;
}
.clock {
margin-top: 30px;
max-width: 100%;
max-height: 100%;
width: 250px;
height: 250px;
background-color: var(--primary-color);
box-shadow: 0 15px 15px rgba(0, 0, 0, 0.35);
position: relative;
border: 5px solid rgb(243, 243, 243);
border-radius: 50%;
overflow: hidden;
user-select: none;
}
.clock::before {
content: '';
background-image: url('Image/lightClock.jpg');
background-position: center center;
background-size: cover;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
transition: background-image 0.3s linear;
}
.needle {
width: 3px;
height: 80px;
border-radius: 10px;
background-color: var(--secondary-color);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -100%) rotate(0deg);
transform-origin: bottom center;
z-index: 2;
}
.hour {
width: 5px;
height: 65px;
}
.second {
height: 85px;
background-color: red;
}
.center-point {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 13px;
height: 13px;
background-color: var(--secondary-color);
border-radius: 50%;
border: 3px solid red;
z-index: 3;
}
button {
position: absolute;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
border: 1px solid var(--secondary-color);
outline: 0;
background-color: transparent;
padding: 8px 15px;
border-radius: 5px;
font-family: inherit;
text-transform: uppercase;
font-size: 14px;
font-weight: 500;
color: var(--secondary-color);
cursor: pointer;
user-select: none;
}
button:active {
transform: scale(0.98) translateX(-50%);
}
body.dark button {
border: 2px solid var(--text-color);
color: var(--text-color);
}