SVG – Learning by Coding

[ accessKey.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 03/03 thomas@handmadecode.de     -->

​ 9: 10: 
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"

11: 
  onload="window.focus()">

​12: 13: 
  <title>SVG Learning by Coding</title>

14: 
  <desc>SVG-Spezifikation in Beispielen</desc>

​15: 16: 
  <text x="20" y="30" style="fill: #000; font-size: 24px">

17: 
    Animationen mit accessKey steuern</text>

​18: 19: 
  <text x="30" y="90" style="font-size: 18px; fill: #00C">

20: 
    <set attributeName="fill" attributeType="CSS" to="#F00" begin="accessKey(r)"/>

21: 
    <set attributeName="fill" attributeType="CSS" to="#00C" begin="accessKey(b)"/>

22: 
    Dieser Text wird rot mit der Taste "R" und blau mit der Taste "B".

23: 
  </text>

​24: 25: 
  <text x="30" y="120" style="font-size: 18px; fill: #090">

26: 
    Der Kreis setzt sich mit der Taste "S" in Bewegung.

27: 
  </text>

​28: 29: 
  <circle cx="50" cy="180" r="20" style="fill: #090">

30: 
    <animate attributeName="cx" attributeType="XML" from="50" to="500"

31: 
      dur="10s" begin="accessKey(s)" fill="freeze"/>

32: 
  </circle>

​33: 34: 
  <text x="30" y="260">

35: 
    [vorher ggfzum Setzen des Fokus in den Zeichenbereich klicken]

36: 
  </text>

​37: 38: 
</svg>

[zum Anfang]