Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scalable SVG with fixed border size

I am looking for a way to keep a fixed line width and keeping the svg responsive.

This is how it should look: https://codepen.io/dudleystorey/pen/wMLBLK

However, the example above is established using CSS and I need to do it with the <path> element.

like image 530
Joost Hobma Avatar asked Dec 04 '25 11:12

Joost Hobma


1 Answers

You can do this via <path stroke-width="2" vector-effect="non-scaling-stroke" ... />, even though keep in mind that vector-effect is not implemented in IE10 or lower.

Have a look here in case you need any further explanation or at this example.

like image 60
d_z90 Avatar answered Dec 07 '25 01:12

d_z90



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!