SVG marker-mid on specific point on path

后端 未结 2 1074
忘掉有多难
忘掉有多难 2020-12-17 00:43

I got some code that generates pathes on canvas. the path objects looks similar to this :



        
2条回答
  •  渐次进展
    2020-12-17 01:26

    sometimes its not so easy to split the path at any point you like. Then you can use text on a path with startOffset to position an "arrow" at any point on a path...

    path {
      fill: none;
      stroke: red;
      stroke-width: 3
    }
    text {
      font-size: 35px;
      fill: red;
      dominant-baseline: central
    }
    
      
      
        
        
        
        
        
        
        
        
        
      
    

提交回复
热议问题