-
Notifications
You must be signed in to change notification settings - Fork 0
/
symbol.html
32 lines (32 loc) · 1.09 KB
/
symbol.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
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<svg width="120" height="140">
<!-- symbol definition NEVER draw -->
<symbol id="sym01" viewBox="0 0 150 110">
<circle cx="50" cy="50" r="40" stroke-width="8"
stroke="red" fill="red"/>
<!-- <polygon fill="white" stroke="black" stroke-width="4" points="50,60 35,40 65,40"/><polygon> -->
<polygon fill="white" stroke="black" stroke-width="4" points="50,70 35,50 65,50"/><polygon>
</symbol>
<symbol id="sym02" viewBox="0 0 150 110">
<circle cx="50" cy="50" r="40" stroke-width="8"
stroke="green" fill="green"/>
<!-- <polygon fill="white" stroke="black" stroke-width="4" points="50,60 35,40 65,40"/><polygon> -->
<polygon fill="white" stroke="black" stroke-width="4" points="45,65 45,35 65,50"/><polygon>
</symbol>
<!-- actual drawing by "use" element -->
<use href="#sym01"
x="0" y="0" width="100" height="50"/>
<use href="#sym01"
x="0" y="50" width="75" height="38"/>
<use href="#sym01"
x="0" y="100" width="50" height="25"/>
<use href="#sym02"
x="50" y="50" width="100" height="50"/>
</svg>
</body>
</html>