Is it possible to use an image in place of the stroke of an SVG path?

后端 未结 2 398
心在旅途
心在旅途 2021-01-20 02:05

First off, I know this question is very similar to this question, but I tried implementing that solution with an SVG PATH and it did not w

2条回答
  •  北海茫月
    2021-01-20 02:30

    It works fine on firefox. I am not sure what the problem is that you are having.

    #container svg {
      fill: none;
      stroke-width: 10px;
      stroke: url(#pattern);
      stroke-dasharray:1628;
      stroke-dashoffset:1628.1;
      animation:polyline 3.15s linear 0.5s forwards;
    }
    
    @keyframes polyline {
      to {
        stroke-dashoffset:0;
      }
    }

提交回复
热议问题