Draw a line that doesn't get thicker when image stretches

后端 未结 1 641
有刺的猬
有刺的猬 2021-01-03 23:38

Is there a way in SVG to draw a line that keeps thin when the image is stretched?

I\'m using a SVG image as a CSS background, something like this:

&l         


        
相关标签:
1条回答
  • 2021-01-04 00:08

    In browsers that implement SVG 1.2T you can have a non-scaling stroke Opera and Webkit support this as does Firefox from version 15.

    <!-- via property -->
    <line … vector-effect="non-scaling-stroke" />
    
    <!-- via CSS -->
    <style>
      line { vector-effect:non-scaling-stroke }
    </style>
    <line … />
    
    0 讨论(0)
提交回复
热议问题