svg css rounded corner not working

前端 未结 2 1597
时光取名叫无心
时光取名叫无心 2021-01-03 19:30

I have an SVG file that I am applying CSS to. Most rules seem to work, but when I apply rules about the rounding of corners (rx:5; ry:5) it has no effect. \'Inline\' style r

2条回答
  •  粉色の甜心
    2021-01-03 19:46

    Scripting can't be simpler, why not to use it:

     yourRect.setAttributeNS(null, "rx", "5");
     yourRect.setAttributeNS(null, "ry", "5");
    

提交回复
热议问题