svg - CSS3 animation is not working -
svg - CSS3 animation is not working -
i have created animation svg using css3 working in chrome , firefox. partially working in safari not working in net explorer (ie9+ back upwards css animations)
see demo
css:
@-webkit-keyframes dash { 70%,80% { stroke-dashoffset: 0; fill-opacity: 0; } 85% { fill-opacity: 0; stroke-opacity: 1; } 95% { stroke: #17739d; stroke-dashoffset: -301; stroke-opacity: 0; } 100% { fill-opacity: 1; stroke-dashoffset: -301; } } @-ms-keyframes dash { 70%,80% { stroke-dashoffset: 0; fill-opacity: 0; } 85% { fill-opacity: 0; stroke-opacity: 1; } 95% { stroke: #17739d; stroke-dashoffset: -301; stroke-opacity: 0; } 100% { fill-opacity: 1; stroke-dashoffset: -301; } } @-moz-keyframes dash { 70%,80% { stroke-dashoffset: 0; fill-opacity: 0; } 85% { fill-opacity: 0; stroke-opacity: 1; } 95% { stroke: #17739d; stroke-dashoffset: -301; stroke-opacity: 0; } 100% { fill-opacity: 1; stroke-dashoffset: -301; } } @keyframes dash { 70%,80% { stroke-dashoffset: 0; fill-opacity: 0; } 85% { fill-opacity: 0; stroke-opacity: 1; } 95% { stroke: #17739d; stroke-dashoffset: -301; stroke-opacity: 0; } 100% { fill-opacity: 1; stroke-dashoffset: -301; } } #layer_1 { margin-left: auto; margin-right : auto; top: 50%; position: absolute; left: 50%; margin-left: -65px; margin-top: -35px; } svg { background: #fff; display: block; } svg * { stroke: #666; #stroke: #17739d; stroke-width: 1; fill-opacity: 0; stroke-dasharray: 350; stroke-dashoffset: 440; } svg #bp_svg * { -webkit-animation-name : dash; -moz-animation-name : dash; -ms-animation-name : dash; animation-name : dash; -webkit-animation-duration: 4s; -moz-animation-duration: 4s; -ms-animation-duration: 4s; animation-duration: 4s; -webkit-animation-timing-function : linear; -moz-animation-timing-function : linear; -ms-animation-timing-function : linear; animation-timing-function : linear; -webkit-animation-fill-mode : forwards; -moz-animation-fill-mode : forwards; -ms-animation-fill-mode : forwards; animation-fill-mode : forwards; }
can help me sort out create work in safari , ie also?
while css3 animations supported in ie9, svg animations not supported in ie11 , it's hard tell whether ever be. have either rely on animated html elements or utilize javascript not benefit hardware acceleration used render css animations still might viable solution.
another thought prerender , deploy gif, either every time or in ie.
source: http://caniuse.com/#feat=svg-smil
css3 svg cross-browser css-animations
Comments
Post a Comment