internet explorer - Svg rotation animation with css not working on ie or edge -
i'm working on animation of spinner on svg. unfortunately, i'm having trouble ie or edge. every other browser supported.
here codepen: http://codepen.io/skjnldsv/pen/oxyjoq
as can see opacity animation works, not rotate. there kind of prefix i'm missing, or svg support broken in ie/edge?
thanks
here 2 svg, first 1 not working, second 1 ok.
<svg xmlns="http://www.w3.org/2000/svg" height="50" width="50"> <style> .spinner { transform-origin: 25px 25px; -webkit-transform-origin: 25px 25px; animation: loading-spin .8s infinite linear; -webkit-animation: loading-spin .8s infinite linear } @-webkit-keyframes loading-spin { 100% { -webkit-transform: rotate(360deg); } } @keyframes loading-spin { 100% { transform: rotate(360deg); } } </style> <defs> <clippath id="a"> <path d="m0 0h25v25h0z" /> </clippath> </defs> <g fill="none"> <circle cx="25" cy="25" r="23" stroke="#000" stroke-opacity=".5" /> <circle class="spinner" cx="25" cy="25" r="23" clip-path="url(#a)" stroke="#191919" stroke-width="3" /> </g> </svg> <svg xmlns="http://www.w3.org/2000/svg" height="50" width="50"> <style> .spinner2 { transform-origin: 25px 25px; -webkit-transform-origin: 25px 25px; animation: loading-spin2 .8s infinite linear; -webkit-animation: loading-spin2 .8s infinite linear } @-webkit-keyframes loading-spin2 { 100% { opacity:0; } } @keyframes loading-spin2 { 100% { opacity:0; } } </style> <defs> <clippath id="a"> <path d="m0 0h25v25h0z" /> </clippath> </defs> <g fill="none"> <circle cx="25" cy="25" r="23" stroke="#000" stroke-opacity=".5" /> <circle class="spinner2" cx="25" cy="25" r="23" clip-path="url(#a)" stroke="#191919" stroke-width="3" /> </g> </svg>
just had same issue myself. after digging around found out css transforms in svg's not supported edge @ moment. it's annoying option use javascript animate svg on edge.
you can follow status of feature on microsoft edge site.
https://developer.microsoft.com/en-us/microsoft-edge/platform/status/supportcsstransformsonsvg/
Comments
Post a Comment