-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (72 loc) · 2.77 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<style>
* { margin: 0; padding: 0; }
ul { list-style-type: none; }
body { background: #ccc; }
img,
#inlineSVG { margin: 10px; border: 1px solid black; width: 100px; height: 100px; }
.imgbox { float: left; width: 122px; height: 200px; margin: 10px; padding: 10px; background-color: white; }
.imgbox label { display: block; }
hr { clear: both; }
</style>
</head>
<body>
<h1>SVG-Beispiele</h1>
<h2>SVG-Dateien</h2>
<div class="imgbox">
<img src="svg1.svg" />
<label>1: 100x100 SVG-Img mit <rect></label>
</div>
<div class="imgbox">
<img src="svg2.svg" />
<label>2: 200x200 SVG-Img gleichen Inhalts</label>
</div>
<div class="imgbox">
<img src="svg3.svg" />
<label>3: Path hinzugefügt mit drei Punkten</label>
</div>
<div class="imgbox">
<img src="svg4.svg" />
<label>4: Eine Linie ist mit Q (quadratic curve) gekrümmt</label>
</div>
<div class="imgbox">
<img src="svg5.svg" />
<label>5: Beide Elemente gruppiert, und die Gruppe skaliert</label>
</div>
<div class="imgbox">
<img src="svg6.svg" />
<label>6: ... und translated</label>
</div>
<div class="imgbox">
<img src="svg7.svg" />
<label>7: Eine Definition mit einem Gradient</label>
</div>
<div class="imgbox">
<img src="svg8.svg" />
<label>8: Eine Definition mit einem "Shadow"-Filter</label>
</div>
<div class="imgbox">
<img src="svg9.svg" />
<label>9: Ein aufwändigerer Path (traced mit Inkcacpe)</label>
</div>
<hr />
<h2>Inline-SVG</h2>
<div class="imgbox">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100" height="100" id="inlineSVG">
<rect width="60" height="40" x="10" y="10" fill="#4effff" stroke="#f34485" stroke-width="2" />
<path d="M 20,20 L 100,50 Q 50,100 0,80 Z" />
</svg>
<button id="button">Button</button>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script>
$('#button').on('click', function() {
$('#inlineSVG').find('rect').css({ 'fill': 'red', 'stroke': 'green', 'stroke-width': 10 }).siblings('path').css({ 'fill-opacity': 0.6 });
});
</script>
</body>
</html>