转换框问题:填充框和Firefox

问题描述

我在firefox中遇到了一个svg文件的问题,我可以将其归结为以下代码(原始图像有几千行代码):

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="15 15 70 70">
<style type="text/css"><![CDATA[
    .sun {
        transform-box: fill-box;
        animation-name: sun-spoke-rotate;
        transform-origin: 50%;
        animation-iteration-count: infinite;
        animation-timing-function: linear;
        animation-duration: 6s;
    }

    .sun path {
        transform-box: fill-box;
        animation-name: sun-spoke-scale;
        transform-origin: 50%;
        animation-iteration-count: infinite;
        animation-direction: alternate;
        animation-duration: 6s;
    }

    @keyframes sun-spoke-scale {
        0%   { transform: scale(1,1) }
        100% { transform: scale(.5,.5) }
    }

    @keyframes sun-spoke-rotate {
        0%   { transform: rotate(0); }
        100% { transform: rotate(360deg); }
    }

]]></style>

<g class="cloud">
    <g class="sun">
        <path
            d="M80.029,43.611h-3.998c-1.105,0-2-0.896-2-1.999s0.895-2,2-2h3.998c1.104,2,0.896,2S81.135,43.611,80.029,43.611z"/>

        <path
            d="M58.033,25.614c-1.105,0-2-0.896-2-2v-3.999c0-1.104,0.895-2,2-2c1.104,2v3.999C60.033,24.718,59.135,25.614,58.033,25.614z"/>

        <path
            d="M42.033,41.612c0,1.104-0.896,1.999-2,1.999h-4c-1.104,0-1.998-0.896-1.998-1.999s0.896-2,1.998-2h4C41.139,39.612,42.033,40.509,41.612z"/>

        <path
            d="M58.033,57.61c1.104,0.895,1.999v4c0,2-2,2c-1.105,0-2-0.896-2-2v-4C56.033,58.505,56.928,57.61,57.61z"/>

        <circle
            style="paint-order: stroke; fill: #f0daba; stroke: #4a4f55; stroke-width: 8px"
            cx="58.033"
            cy="41.612"
            r="7.999"/>
    </g>
</g>

这在chrome和最新版本的edge中可以正常工作。它当然在Internet Explorer中根本不起作用,但真正困扰我的是我在firefox中也遇到了问题。它运作良好---直到我开始移动鼠标为止!然后它开始到处跳跃。我认为这与转换框有关:填充框。有什么想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)