-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.html
51 lines (47 loc) · 1.32 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
<!DOCTYPE html>
<html>
<head>
<title>SVG Clock examples</title>
<script src="snap.svg-min.js"></script>
<script src="clock.js"></script>
<style>
body { font-family: sans-serif; }
div { width: 300px; heigth: 350px; float: left; text-align: center; margin-bottom: 2em; }
h1 { font-size: 1.6em; }
h2 { font-size: 1.2em; }
p { font-size: 0.9em; }
p.clear{ clear: left; }
</style>
</head>
<body>
<h1>SVG Clock examples</h1>
<div>
<svg id="clockUK" width="300" height="300">
<h2>London (or your local time)</h2>
</div>
<div>
<svg id="clockUKBounce" width="300" height="300">
<h2>2 hours ahead with hand bounce</h2>
</div>
<div>
<svg id="clockNYC" width="300" height="300">
<h2>New York (-5)</h2>
</div>
<div>
<svg id="clock" width="300" height="300">
<h2>Fixed time (21:38)</h2>
</div>
<p class="clear">Download at <a href="https://github.com/simonrjones/svg-clock">GitHub</a> | <a href="http://www.studio24.net">Studio 24</a> </p>
<script>
// Start clocks
var uk = new Clock("clockUK");
uk.startClock();
var ukbounce = new Clock("clockUKBounce", { showSeconds: true, offset: 2, movement: "bounce" });
ukbounce.startClock();
var nyc = new Clock("clockNYC", -5);
nyc.startClock();
var clock = new Clock("clock", 21, 39);
clock.hideSecondHand();
</script>
</body>
</html>