2016-05-16 135 views
2

即使我添加了-webkit-前缀,stroke-dashoffset也不能用于safari。请帮帮我。谢谢!....SVG stroke-dashoffset不适用于safari

这里是我的示例代码....

#path1 { 
    stroke-dasharray: 500; 
    -webkit-animation: dash 2s ease; 
    animation: dash 2s ease; 
    display:inline-block; 
} 
.path2 { 
    stroke-dasharray: 500; 
    -webkit-animation: dash 2s ease; 
    animation: dash 2s ease; 
    display:inline-block; 
} 

@keyframes dash { 
    from { 
    stroke-dashoffset: -500; 
    } 
} 

@-webkit-keyframes dash { 
    from { 
    stroke-dashoffset: -500; 
    } 
} 
+0

帮助我们来帮助你。请提供[MCVE](http://stackoverflow.com/help/mcve)。 –

回答

3

Safari不支持负行程dashoffset ......

1

如上所述,负值唐不适用于中风 - 快速偏移。如果你把你的数值转换成正数,这应该可以工作(你也需要改变你的初始值):

.path2 { 
    stroke-dasharray: 1500; 
} 

@keyframes dash { 
    from { 
    stroke-dashoffset: 500; 
    } 
} 

@-webkit-keyframes dash { 
    from { 
    stroke-dashoffset: 500; 
    } 
} 
相关问题