The SVG stroke-dasharray property

A simple example of using the SVG stroke-dasharray property.
<!DOCTYPE HTML>
<html>
  <head>
    <style>
      body {
        margin: 0px;
        padding: 0px;
      }
    </style>
  </head>
  <body>

    <svg height="300" width="300" mlns="http://www.w3.org/2000/svg">
      <g fill="none" stroke="black" stroke-width="4">
        <path stroke-dasharray="1,3" d="M5 20 l255 50" />
        <path stroke-dasharray="3,5,10,5,3" d="M5 40 l255 50" />
        <path stroke-dasharray="30,10,30,5,5,14" d="M5 60 l255 50" />
      </g>
    </svg>

  </body>
</html>

Responses

0 Replies