-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
82 lines (72 loc) · 1.72 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
body {
margin: 0;
background-image: url("clockwallpaper.png");
background-size: cover;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
#clockContainer {
position: relative;
width: clamp(200px, 45vw, 90vh); /* Scales between 200px and 90% of the viewport height */
height: clamp(200px, 45vw, 90vh); /* Matches the width */
border: 0.4em solid red;
border-radius: 50%;
margin: auto;
background-color: rgb(42, 45, 45);
background-image: url("clock1.png");
background-size: cover;
box-shadow: 0 0 1em rgba(255, 0, 0, 0.5), 0 0 3em rgba(255, 255, 255, 0.2);
}
#hour, #minute, #second {
position: absolute;
background: red;
border-radius: 10px;
transform-origin: bottom;
transition: transform 0.05s linear;
}
#hour {
height: 22%;
width: 1%;
top: 28%;
left: 49.5%;
box-shadow: 0 0 0.5em rgba(255, 0, 0, 0.8);
}
#minute {
height: 28%;
width: 0.7%;
top: 22%;
left: 49.65%;
background-color: blue;
box-shadow: 0 0 0.5em rgba(0, 0, 255, 0.8);
}
#second {
height: 35%;
width: 0.5%;
top: 15%;
left: 49.75%;
background-color: green;
box-shadow: 0 0 0.5em rgba(0, 255, 0, 0.8);
}
@media (max-width: 768px) {
#clockContainer {
border: 0.3em solid red;
box-shadow: 0 0 0.8em rgba(255, 0, 0, 0.5), 0 0 2em rgba(255, 255, 255, 0.2);
}
#hour {
width: 0.8%;
}
#minute {
width: 0.6%;
}
#second {
width: 0.4%;
}
}
@media (max-width: 480px) {
#clockContainer {
border: 0.2em solid red;
}
}