SVG – Learning by Coding

[ animateTransform.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">

15: 
    Element animateTransform</text>

​16: 17: 
  <rect x="310" y="80" width="100" height="80" style="fill: #F00">

18: 
    <animateTransform attributeName="transform" attributeType="XML"

19: 
      type="rotate" from="0" to="60" begin="2s" dur="10s" fill="freeze"/>

20: 
  </rect>

​21: 22: 
  <rect x="30" y="80" width="100" height="80" style="fill: #00C">

23: 
    <animateTransform attributeName="transform" attributeType="XML"

24: 
      type="translate" from="0,0" to="300,200" begin="2s" dur="10s" fill="freeze"/>

25: 
  </rect>

​26: 27: 
  <rect x="170" y="280" width="100" height="80" style="fill: #090">

28: 
    <animateTransform attributeName="transform" attributeType="XML"

29: 
      type="scale" from="1" to="0.2" begin="2s" dur="10s" fill="freeze"/>

30: 
  </rect>

​31: 32: 
  <rect x="170" y="170" width="100" height="80" style="fill: #FF0">

33: 
    <animateTransform attributeName="transform" attributeType="XML"

34: 
      type="translate" values="0,0;110,105;0,0" begin="2s" dur="10s" fill="freeze"/>

35: 
    <animateTransform attributeName="transform" attributeType="XML"

36: 
      type="scale" values="1;0.5;1" begin="2s" dur="10s" additive="sum" fill="freeze"/>

37: 
  </rect>

​38: 39: 
</svg>

[zum Anfang]