use_opacity_grid.svg 835 B

123456789101112131415161718
  1. <svg viewBox="0 0 80 20" xmlns="http://www.w3.org/2000/svg"
  2. xmlns:xlink="http://www.w3.org/1999/xlink">
  3. <!-- Our symbol in its own coordinate system -->
  4. <!-- note: viewBox not supported yet -->
  5. <symbol id="myDot" width="10" height="10" viewBox="0 0 2 2">
  6. <circle cx="1" cy="1" r="1" />
  7. </symbol>
  8. <!-- A grid to materialized our symbol positionning -->
  9. <path d="M0,10 h80 M10,0 v20 M25,0 v20 M40,0 v20 M55,0 v20 M70,0 v20" fill="none" stroke="pink" />
  10. <!-- All instances of our symbol -->
  11. <use xlink:href="#myDot" x="5" y="5" style="opacity:1.0" />
  12. <use xlink:href="#myDot" x="20" y="5" style="opacity:0.8" />
  13. <use xlink:href="#myDot" x="35" y="5" style="opacity:0.6" />
  14. <use xlink:href="#myDot" x="50" y="5" style="opacity:0.4" />
  15. <use xlink:href="#myDot" x="65" y="5" style="opacity:0.2" />
  16. </svg>