Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dive into SVG

yomotsu
August 21, 2011

Dive into SVG

yomotsu

August 21, 2011
Tweet

More Decks by yomotsu

Other Decks in Programming

Transcript

  1. 

  2. ޙ൒ͷྲྀΕ  5SBOTGPSN  -JOL  4UZMJOH  'JMUFS 

    "OJNBUJPO  4DSJQU  &NCFE  ·ͱΊ 
  3. TDBMF  USBOTMBUF   SPUBUF    TLFX9

     TLFX:  NBUSJY       ֦େॖখ Ҡಈ ճసͱͦͷத৺ εΩϡʔ ࣼ܏ม׵ԣ εΩϡʔ ࣼ܏ม׵ॎ ߦྻม׵
  4.  selector { -webkit-transform : rotate(45deg); -moz-transform : rotate(45deg); -ms-transform

    : rotate(45deg); -o-transform : rotate(45deg); transform : rotate(45deg); }
  5. <filter id="DropShadow"> <feGaussianBlur in="sourceAlpha" stdDeviation="5" result="blur"/> <feOffet in="blur" dx="5" dy="5"

    result="offetBlur"/> <feMerge> <feMergeNode in="offsetBlur"/> <feMergeNode in="sourceGraphic"/> </feMerge> </filter> 
  6. <filter id="DropShadow"> <feGaussianBlur in="sourceAlpha" stdDeviation="5" result="blur"/> <feOffet in="blur" dx="5" dy="5"

    result="offetBlur"/> <feMerge> <feMergeNode in="offsetBlur"/> <feMergeNode in="sourceGraphic"/> </feMerge> </filter> 
  7. <filter id="DropShadow"> <feGaussianBlur in="sourceAlpha" stdDeviation="5" result="blur"/> <feOffet in="blur" dx="5" dy="5"

    result="offetBlur"/> <feMerge> <feMergeNode in="offsetBlur"/> <feMergeNode in="sourceGraphic"/> </feMerge> </filter> 
  8. <filter id="DropShadow"> <feGaussianBlur in="sourceAlpha" stdDeviation="5" result="blur"/> <feOffet in="blur" dx="5" dy="5"

    result="offetBlur"/> <feMerge> <feMergeNode in="offsetBlur"/> <feMergeNode in="sourceGraphic"/> </feMerge> </filter> 
  9. <filter id="DropShadow"> <feGaussianBlur in="sourceAlpha" stdDeviation="5" result="blur"/> <feOffet in="blur" dx="5" dy="5"

    result="offetBlur"/> <feMerge> <feMergeNode in="offsetBlur"/> <feMergeNode in="sourceGraphic"/> </feMerge> </filter> 
  10. <filter id="DropShadow"> <feGaussianBlur in="sourceAlpha" stdDeviation="5" result="blur"/> <feOffet in="blur" dx="5" dy="5"

    result="offetBlur"/> <feMerge> <feMergeNode in="offsetBlur"/> <feMergeNode in="sourceGraphic"/> </feMerge> </filter> 
  11. <filter id="DropShadow"> <feGaussianBlur in="sourceAlpha" stdDeviation="5" result="blur"/> <feOffet in="blur" dx="5" dy="5"

    result="offetBlur"/> <feMerge> <feMergeNode in="offsetBlur"/> <feMergeNode in="sourceGraphic"/> </feMerge> </filter> 
  12. <svg xmlns="http://www.w3.org/2000/svg"> <g id="sample" ...> <path d="..."/> </g> <script type="application/ecmascript">

    document.querySelector("#sample").addEventListener("click", function(){ this.setAttribute("fill","red"); alert("Clicked !!"); }, false); </script> </svg>