-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclock.htm
More file actions
64 lines (64 loc) · 1.13 KB
/
clock.htm
File metadata and controls
64 lines (64 loc) · 1.13 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
<! DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JS + CSS Clock</title>
</head>
<body>
<div class="clock">
<div class="clock-face">
<div class="hand hhand"></div>
<div class="hand mhand"></div>
<div class="hand shand"></div>
</div>
</div>
<style>
html{
background-image: url('wall.jpg');
background-size: cover;
font-size: 10px;
text-align: center;
}
body{
margin: 0;
flex: 1;
display: flex;
align-items: center;
font-size: 2rem;
}
.clock{
width:400px;
height: 400px;
border: 4px solid #A9CCE3;
border-radius:10%;
margin:50% auto;
position: relative;
padding: 20px;
box-shadow:
0 0 0 4px rgba(0,0,0,0.1),
inset 0 0 0 3px #EFEFEF,
inset 0 0 10px black,
0 0 10px rgba(0,0,0,0.2);
}
.clock-face{
position: relative;
width: 100%;
height:100%;
transform: translateY(-3px);
}
.hand{
background: black;
width:50%;
height:4px;
position: absolute;
top:50%;
transform-origin: 100%;
transform: rotate(90deg);
transition: all 0.05s;
transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1);
}
</style>
<script src="clock.js">
</script>
</body>
</html>