svg css rounded corner not working

前端 未结 2 1610
时光取名叫无心
时光取名叫无心 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

    rx and ry are regular attributes rather than presentation attributes. Only presentation attributes can be styled by CSS. The various regular/presentation attributes are listed here

    See also Presentation Attribute and Property from the SVG 1.1 specification.

    The upcoming SVG 2 specification proposes that most presentation attributes become CSS properties. So far Chrome and Firefox have implemented this part of the draft specification. I imagine other UAs will implement this in due course.

提交回复
热议问题