svg transform-origin problems in firefox

后端 未结 2 948
逝去的感伤
逝去的感伤 2021-01-07 12:25

excuse my terrible English. I\'m having a problem when I want to animate an SVG in firefox. The problem comes from the \"transform-origin\" example of my code: http://codepe

相关标签:
2条回答
  • 2021-01-07 13:15

    Percentage values in transform-origin currently work in Firefox "as expected" only when svg.transform-box.enabled preference in about:config is tet to true and the element has

    transform-box:fill-box.

    Relevant bug is Bug 1209061 - transform-origin not applied correctly on svg content.

    0 讨论(0)
  • 2021-01-07 13:19

    Firefox is behaving correctly as per the spec. Chrome implemented transform-origin early before the spec finalised. It handles percentage values differently to what the final spec specified. AFAIK they have not fixed that yet.

    If you want your animation to be compatible with all browsers, don't use percentage values in transform-origin.

    transform-origin: 3246px 6271px;
    

    http://codepen.io/anon/pen/MbrWod

    0 讨论(0)
提交回复
热议问题