SVG – Learning by Coding
1: <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2: <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
3: "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
4: <!ATTLIST svg xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink">
5: ]>
6:
7: <!-- SVG - Learning by Coding - http://www.datenverdrahten.de/svglbc/ -->
8: <!-- Author: Dr. Thomas Meinike 05/03 - thomas@handmadecode.de -->
9:
10: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
11:
12: <title>SVG - Learning by Coding</title>
13: <desc>SVG-Spezifikation in Beispielen</desc>
14:
15: <defs>
16:
17: <script type="text/javascript">
18: <![CDATA[
19:
20: function getDefFont()
21: {
22: alert("defaultFontSize: "+window.defaultFontSize+
23: "\ndefaultFontFamily: "+window.defaultFontFamily);
24: }
25:
26:
27: function setDefFont(s,f)
28: {
29: window.defaultFontSize=s;
30: window.defaultFontFamily=f;
31: }
32:
33: ]]>
34: </script>
35:
36: </defs>
37:
38: <text x="20" y="30" style="fill: #000; font-size: 24px; font-family: sans-serif">
39: ASV-Eigenschaften defaultFontSize und defaultFontFamily</text>
40:
41: <a xlink:href="" cursor="pointer" onclick="return false">
42: <text x="40" y="70" style="fill: #F00; font-size: 18px"
43: onclick="getDefFont()">aktuelle Werte anzeigen</text>
44: </a>
45:
46: <a xlink:href="" cursor="pointer" onclick="return false">
47: <text x="260" y="70" style="fill: #00C; font-size: 18px"
48: onclick="setDefFont(24,'fantasy')">neue Werte setzen</text>
49: </a>
50:
51: <text x="100" y="100">Das ist ein Testtext, der sich verändern sollte ...</text>
52:
53: </svg>
[zum Anfang]