SVG – Learning by Coding

[ simple_shadows.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 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: 
  <text x="30" y="30" style="fill: #000; font-size: 24px">

16: 
    Schatten durch Verschiebung</text>

​17: 18: 
  <!-- Schatten-Rechteck 1:

19: 
    um 7 Pixel in xund y-Richtung direkt verschoben -->

​20: 21: 
  <rect x="37" y="77" width="150" height="75"

22: 
    style="fill: #CCC"/>

​23: 24: 
  <!-- Schatten-Rechteck 2:

25: 
    um 7 Pixel in xund y-Richtung mittels translate verschoben -->

​26: 27: 
  <rect x="230" y="70" width="150" height="75"

28: 
    style="fill: #CCC" transform="translate(7,7)"/>

​29: 30: 
  <!-- Basisrechtecke, die einen Schatten erhalten sollen: -->

​31: 32: 
  <rect x="30" y="70" width="150" height="75"

33: 
    style="fill: #CFC"/>

​34: 35: 
  <rect x="230" y="70" width="150" height="75"

36: 
    style="fill: #FCF"/>

​37: 38: 
</svg>

[zum Anfang]