-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdemo.html
60 lines (52 loc) · 1.15 KB
/
demo.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>html5-demo1</title>
<style>
body{ text-align:center;}
</style>
<script>
window.onload=function(){
var oC=document.getElementById('c1');
var gd=oC.getContext('2d');
gd.lineWidth=5;
gd.strokeStyle='#163B62';
gd.beginPath();
gd.arc(70,70,40,0,Math.PI*2,false);
gd.stroke();
gd.strokeStyle='#000';
gd.beginPath();
gd.arc(160,70,40,0,Math.PI*2,false);
gd.stroke();
gd.strokeStyle='#BF0628';
gd.beginPath();
gd.arc(250,70,40,0,Math.PI*2,false);
gd.stroke();
gd.strokeStyle='#EBC41F';
gd.beginPath();
gd.arc(110,110,40,0,Math.PI*2,false);
gd.stroke();
gd.strokeStyle='#198E4A';
gd.beginPath();
gd.arc(200,110,40,0,Math.PI*2,false);
gd.stroke();
gd.strokeStyle='#163B62';
gd.beginPath();
gd.arc(70,70,40,Math.PI*1.9,Math.PI*2.1,false);
gd.stroke();
gd.strokeStyle='#000';
gd.beginPath();
gd.arc(160,70,40,Math.PI*0.9,Math.PI*2.1,false);
gd.stroke();
gd.strokeStyle='#BF0628';
gd.beginPath();
gd.arc(250,70,40,Math.PI*0.9,Math.PI*2.1,false);
gd.stroke();
};
</script>
</head>
<body>
<canvas id="c1" width="800" height="600" style="border:1px solid #000;"></canvas>
</body>
</html>