-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
150 lines (132 loc) · 2.87 KB
/
index.html
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html>
<head>
<tittle class="tittle">Clock</tittle>
</head>
<body>
<div class="realistic-clock">
<div class="clock-face">
<div class="glass-cover"></div>
<div class="hour hand"></div>
<div class="minute hand"></div>
<div class="second hand"></div>
<div class="center-circle"></div>
<div class="clock-numbers">
<p style="top: 0.5px; left: 135px;" class="number">12</p>
<p style="top: 100px; right: 10px;" class="number">3</p>
<p style="bottom: 0.5px; left: 135px;" class="number">6</p>
<p style="top: 100px; left: 10px;" class="number">9</p>
</div>
</div>
</div>
<style>
body{
background-color: #1d6981;
}
.tittle{
font-size: 48px;
color: #b60d0d;
}
.realistic-clock {
position: relative;
width: 300px;
height: 300px;
margin: 50px auto;
}
.clock-face {
position: relative;
width: 100%;
height: 100%;
background: radial-gradient(circle, #333, #111);
border-radius: 50%;
border: 10px solid #cec5c5;
box-shadow:
0 0 30px rgba(0, 0, 0, 0.5),
inset 0 0 20px rgba(255, 255, 255, 0.1);
}
.glass-cover {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.05);
box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.3);
pointer-events: none;
}
.center-circle {
position: absolute;
width: 20px;
height: 20px;
background: radial-gradient(circle, #666, #333);
border-radius: 50%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}
.hand {
position: absolute;
background: #222;
border-radius: 2px;
left: 50%;
transform-origin: bottom;
transform: translateX(-50%);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}
.hour {
width: 10px;
height: 100px;
top: 70px;
background: linear-gradient(to bottom, #1d6981, #444);
animation: rotate-hour 43200s linear infinite;
}
.minute {
width: 6px;
height: 100px;
top: 60px;
background: linear-gradient(to bottom, #bbb, #666);
animation: rotate-minute 3600s linear infinite;
}
.second {
width: 3px;
height: 100px;
top: 45px;
background: red;
animation: rotate-second 60s linear infinite;
}
.number {
position: absolute;
font-size: 20px;
font-weight: bold;
color: #fff;
text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}
@keyframes rotate-hour {
from {
transform: translateX(-50%) rotate(0deg);
}
to {
transform: translateX(-50%) rotate(360deg);
}
}
@keyframes rotate-minute {
from {
transform: translateX(-50%) rotate(0deg);
}
to {
transform: translateX(-50%) rotate(360deg);
}
}
@keyframes rotate-second {
from {
transform: translateX(-50%) rotate(0deg);
}
to {
transform: translateX(-50%) rotate(360deg);
}
}
</style>
</body>
</html>