I am trying to implement this SVG circular progress bar using this code.
But it is not working in browsers other than Chrome. Can anyone tell me the what's the problem?
The code as below:
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="200px" height="200px" viewBox="-5 0 210 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M200,100 C200,44.771525 155.228475,0 100,0 C44.771525,0 0,44.771525 0,100 C0,155.228475 44.771525,200 100,200 C155.228475,200 200,155.228475 200,100 Z" class="circle base"></path>
<path d="M200,100 C200,44.771525 155.228475,0 100,0 C44.771525,0 0,44.771525 0,100 C0,155.228475 44.771525,200 100,200 C155.228475,200 200,155.228475 200,100 Z" class="circle progress" style="-webkit-animation-duration: 5s;"></path>
</svg>
CSS
body {
margin: 0;
height: 100%;
}
svg {
display: table;
height: 100%;
width: 50%;
margin-left: 25%;
}
path.circle {
display: table-cell;
fill: none;
stroke: #DEDEDE;
stroke-width: 10;
stroke-dasharray: 629;
vertical-align: middle;
-webkit-transform-origin: center center;
}
path.progress {
stroke: #0094CC;
-webkit-animation: progress 20s linear;
-webkit-transform: rotate(-90deg) scale(1, -1);
}
path.base {
/* -webkit-animation: base 20s linear; */
-webkit-transform: rotate(-90deg);
}
@-webkit-keyframes progress {
from { stroke-dashoffset: 629; }
to { stroke-dashoffset: 0; }
}
@-webkit-keyframes base {
from { stroke-dashoffset: 0; }
to { stroke-dashoffset: 629; }
}
My question is if I add the properties for -moz-, -o- still it does not work in Firefox or opera. What might be the problem. While the same code works in Chrome .any extra thing I may be missing out for Firefox or opera.I replaced the values -webkit- with -moz-,-o- still it does not work.