-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
57 lines (53 loc) · 1.45 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
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>gulp dev workflow</title>
<link rel="stylesheet" href="/dist/css/common/common.min.css" />
<style>
body {
display: flex;
justify-content: space-around;
align-items: center;
background: #000000;
}
.counter {
width: 100%;
text-align: center;
font-size: 27vw;
font-weight: bold;
color: #d2c9c9;
font-family: Arial, Helvetica, sans-serif;
}
.counter span{
display: inline-block;
width: 35vw;
/* line-height: 57vh; */
line-height: 30vw;
border-radius: 2vw;
background-color: #0f0f0f;
}
</style>
</head>
<body>
<div class="counter">
<span class="hours">09</span>
<span class="minutes">21</span>
</div>
<script>
function clock() {
let now = new Date();
let hour = now.getHours() + "";
let minute = now.getMinutes() + "";
let month = now.getMonth() + 1 + "";
let day = now.getDate() + "";
const hours = document.querySelector('.hours');
const minutes = document.querySelector('.minutes');
hours.innerHTML = hour.padStart(2,"0");
minutes.innerHTML = minute.padStart(2, "0");
}
clock();
setInterval(clock, 1000);
</script>
</body>
</html>