-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathisketch.timer.htm
More file actions
47 lines (47 loc) · 1.55 KB
/
Copy pathisketch.timer.htm
File metadata and controls
47 lines (47 loc) · 1.55 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
<!DOCTYPE html>
<html>
<head>
<style>
.isketch-timer {
position: absolute;
top:20px;
left:20px;
width:60px;
height:60px;
border-radius: 30px;
background-color:white;
}
.isketch-timer-frame {
position: relative;
width:100px;
height:100px;
}
.isketch-timer-frame::after {
content:'';
display: block;
position: absolute;
top:0px;
left:0px;
width:100px;
height:100px;
background-image:url('isketch.timer.skin.svg');
background-size:100% 100%;
}
</style>
<script type="module">
import iSketchTimer from "./isketch.timer.js";
window.timer1 = new iSketchTimer(".isketch-timer.t1");
window.timer2 = new iSketchTimer(".isketch-timer.t2");
</script>
</head>
<body>
<div class="isketch-timer-frame">
<canvas width="110" height="110" class="isketch-timer t1"></canvas>
</div>
<div class="isketch-timer-frame">
<canvas width="110" height="110" class="isketch-timer t2"></canvas>
</div>
<button onclick="timer1.startTimer()">Start</button>
<button onclick="timer2.startTimer()">Start</button>
</body>
</html>