SVG – Learning by Coding

[ set.svg --> Grafik anzeigen ]

 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: <!--    AuthorDrThomas Meinike 12/02 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:   <text x="20" y="30" style="fill: #000; font-size: 24px">Element set</text>
15: 
16:   <rect x="50" y="50" width="100" height="80" style="fill: #F00">
17:     <set attributeName="fill" attributeType="CSS" to="#00C" begin="mouseover"/>
18:     <set attributeName="fill" attributeType="CSS" to="#F00" begin="mouseout"/>
19:     <set attributeName="width" attributeType="XML" to="200" begin="mouseover"/>
20:     <set attributeName="width" attributeType="XML" to="100" begin="mouseout"/>
21:   </rect>
22: 
23:   <text x="20" y="160" style="fill: #000; font-size: 12px">onmouseover &#8211;&#8250;
24:     Rechteck blau und 200px breitonmouseout &#8211;&#8250; Rechteck rot und 100px breit</text>
25: 
26:   <circle id="kreis1" cx="50" cy="230" r="20" style="fill: #00C"/>
27: 
28:   <circle id="kreis2" cx="150" cy="230" r="20" style="fill: #FF0">
29:     <set begin="kreis1.click" attributeName="fill" attributeType="CSS" to="#090"/>
30:     <set begin="click" attributeName="fill" attributeType="CSS" to="#FF0"/>
31:   </circle>
32: 
33:   <text x="20" y="280" style="fill: #000; font-size: 12px">onclick linker Kreis &#8211;&#8250;
34:     rechter kreis grünonclick rechter Kreis &#8211;&#8250; rechter Kreis gelb</text>
35: 
36:   <a xlink:href="http://www.w3.org/Graphics/SVG/Overview.htm8" target="_top">
37:     <text x="30" y="340" style="font-size: 18px; fill: #00C">Link zur SVG-Seite des W3C
38:       <set attributeName="fill" attributeType="CSS" to="#F00" begin="mouseover"/>
39:       <set attributeName="text-decoration" attributeType="CSS" to="underline" begin="mouseover"/>
40:       <set attributeName="fill" attributeType="CSS" to="#00C" begin="mouseout"/>
41:       <set attributeName="text-decoration" attributeType="CSS" to="none" begin="mouseout"/>
42:     </text>
43:   </a>
44: 
45:   <text x="20" y="370" style="fill: #000; font-size: 12px">Link mit Hover-Effekt
46:     (Änderung von Farbe und Unterstreichung)</text>
47: 
48: </svg>

[zum Anfang]