Start css3 animation when the content is visible - html

I've made an animation using svg and now I wonder how to activate it when it shows on the screen. Tried with Scroll Reveal but it doesn't work.
Here is the animation: http://jsfiddle.net/z86026mv/148/light/
HTML
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" width="136.5px" height="100.15px" viewBox="0 0 136.5 100.15" enable-background="new 0 0 136.5 100.15" xml:space="preserve">
<rect class="key" x="111.284" y="80.95" fill="none" stroke="#000000" stroke-width="6" stroke-miterlimit="10" width="1.02" height="1.02"/>
<path class="phone" fill="none" stroke="#000000" stroke-width="6" stroke-miterlimit="10" d="M102.85 31.275L90.902 43.222v51.003h29.837l11.947-11.946V31.275H102.85z"/>
<polyline class="bottom_line" fill="none" stroke="#000000" stroke-width="6" stroke-miterlimit="10" points="52.476 94.225 65.188 94.225 78.059 94.225 "/>
<line class="vert_line" fill="none" stroke="#000000" stroke-width="6" stroke-miterlimit="10" x1="65.188" y1="94.225" x2="65.188" y2="81.969"/>
<polyline class="screen" fill="none" stroke="#000000" stroke-width="6" stroke-miterlimit="10" points="120.74 22.27 120.74 5.924 3.813 5.924 3.813 81.969 82.262 81.969 "/>
CSS
/*Animacje*/
svg * {
fill: none;
stroke: currentColor;
stroke-linecap: square;
stroke-linejoin: miter;
color: #100F0D;
stroke-width: 6;
stroke-miterlimit: 10;
}
.phone {
animation: draw 1.5s cubic-bezier(1, 0.1, 0, 0.87) alternate;
-webkit-animation: draw 1.5s cubic-bezier(1, 0.1, 0, 0.87) alternate;
}
#keyframes draw {
0% {
stroke-dashoffset: 192;
stroke-dasharray: 192;
}
100% {
stroke-dashoffset: 0;
stroke-dasharray: 192;
}
}
.screen {
animation: screen 1.5s cubic-bezier(1, 0.1, 0, 0.87) alternate;
-webkit-animation: screen 1.5s cubic-bezier(1, 0.1, 0, 0.87) alternate;
fill-opacity: 0;
stroke: #000;
stroke-width: 6;
}
#keyframes screen {
0% {
stroke-dashoffset: 290;
stroke-dasharray: 290;
}
100% {
stroke-dashoffset: 0;
stroke-dasharray: 290;
}
}
.bottom_line {
position: absolute;
opacity: 0;
-webkit-animation: bottom_line 1s cubic-bezier(1, 0.1, 0, 0.87) 1s forwards;
-moz-animation: bottom_line 1s cubic-bezier(1, 0.1, 0, 0.87) 1s forwards;
-o-animation: bottom_line 1s cubic-bezier(1, 0.1, 0, 0.87) 1s forwards;
animation: bottom_line 1s cubic-bezier(1, 0.1, 0, 0.87) 1s forwards;
}
#keyframes bottom_line {
0% {
opacity: 1;
stroke-dashoffset: 290;
stroke-dasharray: 290;
}
100% {
opacity: 1;
stroke-dashoffset: 0;
stroke-dasharray: 290;
}
}
.vert_line{
position: absolute;
opacity: 0;
-webkit-animation: vert_line 1s cubic-bezier(1, 0.1, 0, 0.87) 1s forwards;
-moz-animation: vert_line 1s cubic-bezier(1, 0.1, 0, 0.87) 1s forwards;
-o-animation: vert_line 1s cubic-bezier(1, 0.1, 0, 0.87) 1s forwards;
animation: vert_line 1s cubic-bezier(1, 0.1, 0, 0.87) 1s forwards;
}
#keyframes vert_line {
0% {
opacity: 1;
stroke-dashoffset: 290;
stroke-dasharray: 290;
}
100% {
opacity: 1;
stroke-dashoffset: 0;
stroke-dasharray: 290;
}
}
.key {
position: absolute;
opacity: 0;
-webkit-animation: key 1s ease 1s forwards;
-moz-animation: key 1s ease 1s forwards;
-o-animation: key 1s ease 1s forwards;
animation: key 1s ease 1s forwards;
}
#keyframes key {
0% {
opacity: 0;
transform: translate(-35px,0px);
-ms-transform: translate(-35px,0px); /* IE 9 */
-webkit-transform: translate(-35px,0px); /* Safari and Chrome */
-o-transform: translate(-35px,0px); /* Opera */
-moz-transform: translate(-35px,0px); /* Firefox */
}
100% {
opacity: 1;
transform: translate(0,0px);
-ms-transform: translate(0,0px); /* IE 9 */
-webkit-transform: translate(0,0px); /* Safari and Chrome */
-o-transform: translate(0,0px); /* Opera */
-moz-transform: translate(0,0px); /* Firefox */
}
}
#-webkit-keyframes key {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
And here, in the "Service" section I have placed it. http://flowagency.nu/index_ico.php
Do you have any ideas?
Thx in advance.

you can set the display of the svg to none var svg = document.getElementsByTagName("svg")[0];
svg.style.display='none'; then when you click on the service tab you can set the display to block svg.style.display='block'; watch out the example below i did the second step using setTimeout you can do it with click or whatever you like
http://jsfiddle.net/z86026mv/149/

Related

Blazor, CSS - Keyframes Animation

I made an animation in CSS for a check (right or wrong). The animation is actually the same, only the color is different. My problem now is that the name of the "Keyframes Fill" class is the same ("100%"). So both have the same color in the Fill animation. Is it possible to fix this problem somehow ?
Thanks.
/*=========================================
Checkmark Green Animation
=========================================
*/
.checkmark__circle {
stroke-dasharray: 166;
stroke-dashoffset: 166;
stroke-width: 2;
stroke-miterlimit: 10;
stroke: #7ac142;
fill: none;
animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark {
width: 32px;
height: 32px;
border-radius: 50%;
stroke-width: 2;
stroke: #fff;
stroke-miterlimit: 10;
margin: 10% auto;
box-shadow: inset 0px 0px 0px #7ac142;
animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark__check {
transform-origin: 50% 50%;
stroke-dasharray: 48;
stroke-dashoffset: 48;
animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
#keyframes stroke {
100% {
stroke-dashoffset: 0;
}
}
#keyframes scale {
0%, 100% {
transform: none;
}
50% {
transform: scale3d(1.1, 1.1, 1);
}
}
#keyframes fill {
100% {
box-shadow: inset 0px 0px 0px 30px #7ac142;
}
}
/*=========================================
Checkmark Red Animation
=========================================
*/
.checkmark__circle_red {
stroke-dasharray: 166;
stroke-dashoffset: 166;
stroke-width: 2;
stroke-miterlimit: 10;
stroke: #ff0000;
fill: none;
animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark_red {
width: 32px;
height: 32px;
border-radius: 50%;
stroke-width: 2;
stroke: #fff;
stroke-miterlimit: 10;
margin: 10% auto;
box-shadow: inset 0px 0px 0px #ff0000;
animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark__check_red {
transform-origin: 50% 50%;
stroke-dasharray: 48;
stroke-dashoffset: 48;
animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
#keyframes stroke{
100% {
stroke-dashoffset: 0;
}
}
#keyframes scale{
0%, 100% {
transform: none;
}
50% {
transform: scale3d(1.1, 1.1, 1);
}
}
#keyframes fill {
100% {
box-shadow: inset 0px 0px 0px 30px #ff0000;
}
}
<!--Here is actually a C# check made (a function is called), depending on whether the entered is correct or incorrect.-->
<svg class="checkmark" viewBox="0 0 52 52">
<circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/>
<path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
</svg>
<svg class="checkmark_red" viewBox="0 0 52 52">
<circle class="checkmark__circle_red" cx="26" cy="26" r="25" fill="none"/>
<path class="checkmark__check_red" fill="none" d="M14.1 14.1l23.8 23.8 m0,-23.8 l-23.8,23.8"/>
</svg>
Is this the result you wanted? If so, do not set the color in the animation, but before. Sadly there is no box-shadow-color property, but you can use color property. see this SO answer
/*=========================================
Checkmark Green Animation
=========================================
*/
.checkmark__circle {
stroke-dasharray: 166;
stroke-dashoffset: 166;
stroke-width: 2;
stroke-miterlimit: 10;
stroke: #7ac142;
fill: none;
animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark {
width: 32px;
height: 32px;
border-radius: 50%;
stroke-width: 2;
stroke: #fff;
stroke-miterlimit: 10;
margin: 10% auto;
color: #7ac142;
animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark__check {
transform-origin: 50% 50%;
stroke-dasharray: 48;
stroke-dashoffset: 48;
animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
#keyframes stroke {
100% {
stroke-dashoffset: 0;
}
}
#keyframes scale {
0%, 100% {
transform: none;
}
50% {
transform: scale3d(1.1, 1.1, 1);
}
}
#keyframes fill {
100% {
box-shadow: inset 0px 0px 0px 30px #7ac142;
}
}
/*=========================================
Checkmark Red Animation
=========================================
*/
.checkmark__circle_red {
stroke-dasharray: 166;
stroke-dashoffset: 166;
stroke-width: 2;
stroke-miterlimit: 10;
stroke: #ff0000;
fill: none;
animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark_red {
width: 32px;
height: 32px;
border-radius: 50%;
stroke-width: 2;
stroke: #fff;
stroke-miterlimit: 10;
margin: 10% auto;
color: #ff0000;
animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark__check_red {
transform-origin: 50% 50%;
stroke-dasharray: 48;
stroke-dashoffset: 48;
animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
#keyframes stroke{
100% {
stroke-dashoffset: 0;
}
}
#keyframes scale{
0%, 100% {
transform: none;
}
50% {
transform: scale3d(1.1, 1.1, 1);
}
}
#keyframes fill {
100% {
box-shadow: inset 0px 0px 0px 30px;
}
}
<svg class="checkmark" viewBox="0 0 52 52">
<circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/>
<path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
</svg>
<svg class="checkmark_red" viewBox="0 0 52 52">
<circle class="checkmark__circle_red" cx="26" cy="26" r="25" fill="none"/>
<path class="checkmark__check_red" fill="none" d="M14.1 14.1l23.8 23.8 m0,-23.8 l-23.8,23.8"/>
</svg>

Make goo effect only when it's in contact with the main shape

I'm using this as a pre-loader and it's working pretty good, but I'd like the "goo" effect to only happen when the moving shapes are actually in contact with the circle in the middle. See how the edges are all blurred up at all times now.
I like that the moving shapes blurs up right when they're in contact with the circle, but when they're at max away from it they should be 100% normal. The way the shape should look like when not in contact with the middle circle:
You can try to comment off the url("#goo") part to see the normal state as well.
.page-preloader-cover {
position: fixed;
z-index: 1200;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
background-color: #fff;
}
.cssload-dots {
width: 200px;
height: 200px;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
margin: auto;
filter: url("#goo");
-o-filter: url("#goo");
-ms-filter: url("#goo");
-webkit-filter: url("#goo");
-moz-filter: url("#goo");
}
.svg-filter {
position: absolute;
}
.cssload-dot {
width: 0;
height: 0;
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%);
-ms-transform: translate(-50%);
transform: translate(-50%);
}
.cssload-dot:before {
content: "";
width: 48px;
height: 48px;
border-radius: 69px;
background: #9664B4;
position: absolute;
left: 50%;
transform: translateY(0);
-o-transform: translateY(0);
-ms-transform: translateY(0);
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
margin-left: -24.5px;
margin-top: -24.5px;
}
.cssload-dot:nth-child(5):before {
z-index: 100;
width: 62.5px;
height: 62.5px;
margin-left: -31.75px;
margin-top: -31.75px;
animation: cssload-dot-colors 4.6s ease infinite;
-o-animation: cssload-dot-colors 4.6s ease infinite;
-ms-animation: cssload-dot-colors 4.6s ease infinite;
-webkit-animation: cssload-dot-colors 4.6s ease infinite;
-moz-animation: cssload-dot-colors 4.6s ease infinite;
}
.cssload-dot:nth-child(1) {
animation: cssload-dot-rotate-1 4.6s 0s linear infinite;
-o-animation: cssload-dot-rotate-1 4.6s 0s linear infinite;
-ms-animation: cssload-dot-rotate-1 4.6s 0s linear infinite;
-webkit-animation: cssload-dot-rotate-1 4.6s 0s linear infinite;
-moz-animation: cssload-dot-rotate-1 4.6s 0s linear infinite;
}
.cssload-dot:nth-child(1):before {
background-color: transparent;
animation: cssload-dot-move 4.6s 0s ease infinite;
-o-animation: cssload-dot-move 4.6s 0s ease infinite;
-ms-animation: cssload-dot-move 4.6s 0s ease infinite;
-webkit-animation: cssload-dot-move 4.6s 0s ease infinite;
-moz-animation: cssload-dot-move 4.6s 0s ease infinite;
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 150 150" xmlns="http://www.w3.org/2000/svg"><path style="fill:%2355AF32;" d="M 120 0 L 120 100 A 50 50 0 1 1 20 100 Z"></path></svg>') !important;
}
.cssload-dot:nth-child(2) {
animation: cssload-dot-rotate-2 4.6s 1.15s linear infinite;
-o-animation: cssload-dot-rotate-2 4.6s 1.15s linear infinite;
-ms-animation: cssload-dot-rotate-2 4.6s 1.15s linear infinite;
-webkit-animation: cssload-dot-rotate-2 4.6s 1.15s linear infinite;
-moz-animation: cssload-dot-rotate-2 4.6s 1.15s linear infinite;
}
.cssload-dot:nth-child(2):before {
background-color: transparent;
animation: cssload-dot-move 4.6s 1.15s ease infinite;
-o-animation: cssload-dot-move 4.6s 1.15s ease infinite;
-ms-animation: cssload-dot-move 4.6s 1.15s ease infinite;
-webkit-animation: cssload-dot-move 4.6s 1.15s ease infinite;
-moz-animation: cssload-dot-move 4.6s 1.15s ease infinite;
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 150 150" xmlns="http://www.w3.org/2000/svg"><path style="fill:%23ff4a49;" d="M 120 0 L 120 100 A 50 50 0 1 1 20 100 Z"></path></svg>') !important;
}
.cssload-dot:nth-child(3) {
animation: cssload-dot-rotate-3 4.6s 2.3s linear infinite;
-o-animation: cssload-dot-rotate-3 4.6s 2.3s linear infinite;
-ms-animation: cssload-dot-rotate-3 4.6s 2.3s linear infinite;
-webkit-animation: cssload-dot-rotate-3 4.6s 2.3s linear infinite;
-moz-animation: cssload-dot-rotate-3 4.6s 2.3s linear infinite;
}
.cssload-dot:nth-child(3):before {
background-color: transparent;
animation: cssload-dot-move 4.6s 2.3s ease infinite;
-o-animation: cssload-dot-move 4.6s 2.3s ease infinite;
-ms-animation: cssload-dot-move 4.6s 2.3s ease infinite;
-webkit-animation: cssload-dot-move 4.6s 2.3s ease infinite;
-moz-animation: cssload-dot-move 4.6s 2.3s ease infinite;
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 150 150" xmlns="http://www.w3.org/2000/svg"><path style="fill:%230A4B9B;" d="M 120 0 L 120 100 A 50 50 0 1 1 20 100 Z"></path></svg>') !important;
}
.cssload-dot:nth-child(4) {
animation: cssload-dot-rotate-4 4.6s 3.45s linear infinite;
-o-animation: cssload-dot-rotate-4 4.6s 3.45s linear infinite;
-ms-animation: cssload-dot-rotate-4 4.6s 3.45s linear infinite;
-webkit-animation: cssload-dot-rotate-4 4.6s 3.45s linear infinite;
-moz-animation: cssload-dot-rotate-4 4.6s 3.45s linear infinite;
}
.cssload-dot:nth-child(4):before {
background-color: transparent;
animation: cssload-dot-move 4.6s 3.45s ease infinite;
-o-animation: cssload-dot-move 4.6s 3.45s ease infinite;
-ms-animation: cssload-dot-move 4.6s 3.45s ease infinite;
-webkit-animation: cssload-dot-move 4.6s 3.45s ease infinite;
-moz-animation: cssload-dot-move 4.6s 3.45s ease infinite;
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 150 150" xmlns="http://www.w3.org/2000/svg"><path style="fill:%239664B4;" d="M 120 0 L 120 100 A 50 50 0 1 1 20 100 Z"></path></svg>') !important;
}
#keyframes cssload-dot-move {
0% {
transform: translateY(0);
}
18%, 22% {
transform: translateY(-96px);
}
40%, 100% {
transform: translateY(0);
}
}
#-o-keyframes cssload-dot-move {
0% {
-o-transform: translateY(0);
}
18%, 22% {
-o-transform: translateY(-96px);
}
40%, 100% {
-o-transform: translateY(0);
}
}
#-ms-keyframes cssload-dot-move {
0% {
-ms-transform: translateY(0);
}
18%, 22% {
-ms-transform: translateY(-96px);
}
40%, 100% {
-ms-transform: translateY(0);
}
}
#-webkit-keyframes cssload-dot-move {
0% {
-webkit-transform: translateY(0);
}
18%, 22% {
-webkit-transform: translateY(-96px);
}
40%, 100% {
-webkit-transform: translateY(0);
}
}
#-moz-keyframes cssload-dot-move {
0% {
-moz-transform: translateY(0);
}
18%, 22% {
-moz-transform: translateY(-96px);
}
40%, 100% {
-moz-transform: translateY(0);
}
}
#keyframes cssload-dot-colors {
0% {
background-color: #9664B4; /*#7a6cea*/
}
25% {
background-color: #55AF32; /*#2be1df*/
}
50% {
background-color: #E61423; /*#ff4a4a*/
}
75% {
background-color: #0A4B9B; /*#3b55e6*/
}
100% {
background-color: #9664B4;
}
}
#-o-keyframes cssload-dot-colors {
0% {
background-color: #9664B4;
}
25% {
background-color: #55AF32;
}
50% {
background-color: #ff4a49;
}
75% {
background-color: #0A4B9B;
}
100% {
background-color: #9664B4;
}
}
#-ms-keyframes cssload-dot-colors {
0% {
background-color: #9664B4;
}
25% {
background-color: #55AF32;
}
50% {
background-color: #ff4a49;
}
75% {
background-color: #0A4B9B;
}
100% {
background-color: #9664B4;
}
}
#-webkit-keyframes cssload-dot-colors {
0% {
background-color: #9664B4;
}
25% {
background-color: #55AF32;
}
50% {
background-color: #ff4a49;
}
75% {
background-color: #0A4B9B;
}
100% {
background-color: #9664B4;
}
}
#-moz-keyframes cssload-dot-colors {
0% {
background-color: #9664B4;
}
25% {
background-color: #55AF32;
}
50% {
background-color: #ff4a49;
}
75% {
background-color: #0A4B9B;
}
100% {
background-color: #9664B4;
}
}
#keyframes cssload-dot-rotate-1 {
0% {
transform: rotate(-105deg);
}
100% {
transform: rotate(270deg);
}
}
#-o-keyframes cssload-dot-rotate-1 {
0% {
-o-transform: rotate(-105deg);
}
100% {
-o-transform: rotate(270deg);
}
}
#-ms-keyframes cssload-dot-rotate-1 {
0% {
-ms-transform: rotate(-105deg);
}
100% {
-ms-transform: rotate(270deg);
}
}
#-webkit-keyframes cssload-dot-rotate-1 {
0% {
-webkit-transform: rotate(-105deg);
}
100% {
-webkit-transform: rotate(270deg);
}
}
#-moz-keyframes cssload-dot-rotate-1 {
0% {
-moz-transform: rotate(-105deg);
}
100% {
-moz-transform: rotate(270deg);
}
}
#keyframes cssload-dot-rotate-2 {
0% {
transform: rotate(165deg);
}
100% {
transform: rotate(540deg);
}
}
#-o-keyframes cssload-dot-rotate-2 {
0% {
-o-transform: rotate(165deg);
}
100% {
-o-transform: rotate(540deg);
}
}
#-ms-keyframes cssload-dot-rotate-2 {
0% {
-ms-transform: rotate(165deg);
}
100% {
-ms-transform: rotate(540deg);
}
}
#-webkit-keyframes cssload-dot-rotate-2 {
0% {
-webkit-transform: rotate(165deg);
}
100% {
-webkit-transform: rotate(540deg);
}
}
#-moz-keyframes cssload-dot-rotate-2 {
0% {
-moz-transform: rotate(165deg);
}
100% {
-moz-transform: rotate(540deg);
}
}
#keyframes cssload-dot-rotate-3 {
0% {
transform: rotate(435deg);
}
100% {
transform: rotate(810deg);
}
}
#-o-keyframes cssload-dot-rotate-3 {
0% {
-o-transform: rotate(435deg);
}
100% {
-o-transform: rotate(810deg);
}
}
#-ms-keyframes cssload-dot-rotate-3 {
0% {
-ms-transform: rotate(435deg);
}
100% {
-ms-transform: rotate(810deg);
}
}
#-webkit-keyframes cssload-dot-rotate-3 {
0% {
-webkit-transform: rotate(435deg);
}
100% {
-webkit-transform: rotate(810deg);
}
}
#-moz-keyframes cssload-dot-rotate-3 {
0% {
-moz-transform: rotate(435deg);
}
100% {
-moz-transform: rotate(810deg);
}
}
#keyframes cssload-dot-rotate-4 {
0% {
transform: rotate(705deg);
}
100% {
transform: rotate(1080deg);
}
}
#-o-keyframes cssload-dot-rotate-4 {
0% {
-o-transform: rotate(705deg);
}
100% {
-o-transform: rotate(1080deg);
}
}
#-ms-keyframes cssload-dot-rotate-4 {
0% {
-ms-transform: rotate(705deg);
}
100% {
-ms-transform: rotate(1080deg);
}
}
#-webkit-keyframes cssload-dot-rotate-4 {
0% {
-webkit-transform: rotate(705deg);
}
100% {
-webkit-transform: rotate(1080deg);
}
}
#-moz-keyframes cssload-dot-rotate-4 {
0% {
-moz-transform: rotate(705deg);
}
100% {
-moz-transform: rotate(1080deg);
}
}
<div class="page-preloader-cover">
<div class="cssload-dots">
<div class="cssload-dot"></div>
<div class="cssload-dot"></div>
<div class="cssload-dot"></div>
<div class="cssload-dot"></div>
<div class="cssload-dot"></div>
</div>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" class="svg-filter">
<defs>
<filter id="goo">
<feGaussianBlur in="SourceGraphic" result="blur" stdDeviation="12"></feGaussianBlur>
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7" result="goo" ></feColorMatrix>
</filter>
</defs>
</svg>
</div>
Here's your loader converted to SVG format.
The relevant part related to the blob blur is here:
<feGaussianBlur in="SourceGraphic" result="blur" stdDeviation="12">
<animate attributeName="stdDeviation"
keyTimes="0; 0.5; 0.9; 1.0"
values="12; 0; 0; 12"
dur="1.15s" repeatCount="indefinite"/>
</feGaussianBlur>
What's happening is that the blur reduces to 0 and back to 12 again every 1.15s to coincide with the movement of the shapes. Over that 1.15sec interval, stdDeviation goes:
from 12 at (0 * 1.15s) to 0 at (0.5 * 1.15s), then
from 0 at (0.9 * 1.15s) to 12 at (1 * 1.15s)
IOW, the keyTimes values represent percentages of that 1.15s animation duration. If you wish, you can tweak those keyTimes values to adjust the timing of the blur animation.
.page-preloader-cover {
position: fixed;
z-index: 1200;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
background-color: #fff;
}
.page-preloader-cover svg {
width: 200px;
height: 200px;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
overflow: visible;
}
<div class="page-preloader-cover">
<svg viewBox="0 0 200 200">
<defs>
<filter id="goo">
<feGaussianBlur in="SourceGraphic" result="blur" stdDeviation="12">
<animate attributeName="stdDeviation"
keyTimes="0; 0.5; 0.9; 1.0"
values="12; 2; 2; 12"
dur="1.15s" repeatCount="indefinite"/>
</feGaussianBlur>
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7" result="goo" ></feColorMatrix>
</filter>
<symbol id="shape" viewBox="0 0 150 150">
<path d="M 120 0 L 120 100 A 50 50 0 1 1 20 100 Z"/>
</symbol>
</defs>
<g transform="translate(100,100)" filter="url(#goo)">
<animate attributeName="filter"
keyTimes="0; 0.4; 0.9; 1.0"
values="url(#goo); none; none; url(#goo)"
dur="1.15s" repeatCount="indefinite"/>
<g>
<use x="-24" y="-24" width="48" height="48" xlink:href="#shape" fill="#55AF32">
<animate attributeName="y" dur="4.6s" repeatCount="indefinite"
calcMode="spline"
keySplines="0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0"
keyTimes="0; 0.18; 0.22; 0.4; 1.0"
values="-24; -120; -120; -24; -24"/>
</use>
<animateTransform attributeName="transform"
type="rotate" from="-105" to="270"
dur="4.6s" repeatCount="indefinite"/>
</g>
<g>
<use x="-24" y="-24" width="48" height="48" xlink:href="#shape" fill="#ff4a49">
<animate attributeName="y" dur="4.6s" repeatCount="indefinite" begin="1.15s"
calcMode="spline"
keySplines="0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0"
keyTimes="0; 0.18; 0.22; 0.4; 1.0"
values="-24; -120; -120; -24; -24"/>
</use>
<animateTransform attributeName="transform"
type="rotate" from="165" to="540"
dur="4.6s" repeatCount="indefinite" begin="1.15s"/>
</g>
<g>
<use x="-24" y="-24" width="48" height="48" xlink:href="#shape" fill="#0A4B9B">
<animate attributeName="y" dur="4.6s" repeatCount="indefinite" begin="2.3s"
calcMode="spline"
keySplines="0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0"
keyTimes="0; 0.18; 0.22; 0.4; 1.0"
values="-24; -120; -120; -24; -24"/>
</use>
<animateTransform attributeName="transform"
type="rotate" from="435" to="810"
dur="4.6s" repeatCount="indefinite" begin="2.35s"/>
</g>
<g>
<use x="-24" y="-24" width="48" height="48" xlink:href="#shape" fill="#9664B4">
<animate attributeName="y" dur="4.6s" repeatCount="indefinite" begin="3.45s"
calcMode="spline"
keySplines="0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0; 0.25 0.1 0.25 1.0"
keyTimes="0; 0.18; 0.22; 0.4; 1.0"
values="-24; -120; -120; -24; -24"/>
</use>
<animateTransform attributeName="transform"
type="rotate" from="705" to="1080"
dur="4.6s" repeatCount="indefinite" begin="3.45s"/>
</g>
<circle cx="0" cy="0" r="31.25" fill="#9664B4">
<animate attributeName="fill" dur="4.6s" repeatCount="indefinite"
keyTimes="0; 0.25; 0.5; 0.75; 1"
values="#9664B4; #55AF32; #E61423; #0A4B9B; #9664B4"/>
</circle>
</g>
</svg>
</div>

CSS animation spinner is intterrupted in IE Edge but works smooth on Firefox and Chrome

I have the following HTML and CSS code:
.spinner-container {
-webkit-animation: rotate 2s linear infinite;
animation: rotate 2s linear infinite;
z-index: 2;
}
.spinner-container .path {
stroke-dasharray: 1,150;
stroke-dashoffset: 0;
stroke: rgba(27, 154, 89, 0.7);
stroke-linecap: round;
-webkit-animation: dash 1.5s ease-in-out infinite;
animation: dash 1.5s ease-in-out infinite;
}
#keyframes rotate {
100% {
transform: rotate(360deg);
-webkit-transform: rotate(360deg);
}
}
#keyframes dash {
0% {
stroke-dasharray: 1,150;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90,150;
stroke-dashoffset: -35;
}
100% {
stroke-dasharray: 90,150;
stroke-dashoffset: -124;
}
}
#-webkit-keyframes dash {
0% {
stroke-dasharray: 1,150;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90,150;
stroke-dashoffset: -35;
}
100% {
stroke-dasharray: 90,150;
stroke-dashoffset: -124;
}
}
<svg class="spinner-container" viewBox="0 0 44 44" style="width: 50px; height: 50px;"><circle class="path" cx="22" cy="22" r="20" fill="none" stroke-width="4"></circle></svg>
If you run it in IE Edge, you will see that animation is interrupted. How can be fixed ?

How to get inline svg animation working in IE

I have been trying to get an line svg animation to behave consistently cross-browser but, Internet Explorer 11 is not beginning the animation on page load.
To simplify my question I have forked an example from jczimmm
I have removed any vendor prefixes to distill the CSS into its barest form so they can be re-added if needed.
Here is the link to the fork on codepen.
Here is the svg
<div class="loader">
<svg class="circular">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>
</svg>
</div>
and here is the css
body {
background-color: #eee;
}
.loader {
position: relative;
margin: 0px auto;
width: 100px;
height: 100px;
zoom: 1.7;
}
.circular {
-webkit-animation: rotate 2s linear infinite;
animation: rotate 2s linear infinite;
height: 100px;
position: relative;
width: 100px;
}
.path {
stroke-dasharray: 1,200;
stroke-dashoffset: 0;
-webkit-animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
stroke-linecap: round;
}
#-webkit-keyframes rotate {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#keyframes rotate {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#-webkit-keyframes dash {
0% {
stroke-dasharray: 1,200;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 89,200;
stroke-dashoffset: -35;
}
100% {
stroke-dasharray: 89,200;
stroke-dashoffset: -124;
}
}
#keyframes dash {
0% {
stroke-dasharray: 1,200;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 89,200;
stroke-dashoffset: -35;
}
100% {
stroke-dasharray: 89,200;
stroke-dashoffset: -124;
}
}
#-webkit-keyframes color {
100%, 0% {
stroke: #d62d20;
}
40% {
stroke: #0057e7;
}
66% {
stroke: #008744;
}
80%, 90% {
stroke: #ffa700;
}
}
#keyframes color {
100%, 0% {
stroke: #d62d20;
}
40% {
stroke: #0057e7;
}
66% {
stroke: #008744;
}
80%, 90% {
stroke: #ffa700;
}
}

Animation not working in mozilla

this codepen works in google chrome but it is not working in mozilla firefox.
CodePen Demo
<svg version="1.1" id="svg_snowman" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" width="286px" height="380px" viewBox="0 0 286 380" enable-background="new 0 0 286 380" xml:space="preserve">
<g id="snowman">
<path class="snowman_body" d="M20.302,221.826c-6.899,83.792,106.271,110.246,149.672,47.643
C236.041,174.189,29.782,107.401,20.302,221.826z"/>
<path class="scarf" d="M62.978,157.992c-5.486,2.424-8.756,6.673-7.191,13.735
c1.887,8.643,12.927,16.689,20.227,20.237c18.053,8.676,44.348,8.364,61.527-3.758c29.854-21.115-24.191-30.144-37.011-31.832
C92.905,155.356,73.691,153.215,62.978,157.992z"/>
<path class="scarf_knot" d="M88.509,177.525c-18.559,6.252-29.452,33.552-28.112,51.221
c0.11,0.106,0.256,0.247,0.365,0.353c8.537-1.302,15,3.198,22.443,6.22c-0.542-15.985,0.146-31.726,13.332-43.214
c0.143-0.106,0.143-0.106,0,0c-4.759,8.534-6.463,21.221-6.463,30.845c6.247-2.494,13.292-3.97,19.828-1.826
c-1.124-12.893-1.924-27.72,8.281-37.698c-4.831-2.986-10.494-5.587-16.126-6.641L88.509,177.525z"/>
<path class="snowman_head" d="M145.783,120.573c-2.77-5.274-6.473-9.863-11.039-13.207
c-2.725-2.003-5.629-3.761-8.606-5.304C72.5,78.667,53.571,129.255,53.534,129.323c-2.471,8.272-2.59,17.065,0.24,25.173
c1.245,3.568,3.056,7.005,5.499,10.204c16.309,21.327,54.842,28.984,77.794,12.79C153.694,165.722,155.441,138.96,145.783,120.573z
"/>
<g id="hat">
<path class="hat-ribbon" d="M45.071,104.135l6.829,12.61c34.1-33.933,65.013-19.442,65.013-19.442l-1.961-14.935
C90.037,83.282,65.447,89.325,45.071,104.135z"/>
<path class="hat-top" d="M112.882,63.362c0,0-8.829-9.698-36.575-5.148C37.661,64.555,35.338,85.67,35.338,85.67l9.733,18.465
c20.376-14.81,44.966-20.853,69.881-21.766L112.882,63.362z"/>
<path class="hat-bottom" d="M53.534,129.075c0.036-0.068,25.632-34.575,72.603-27.137c2.978,1.543,5.882,3.363,8.606,5.366
c4.566,3.344,8.269,7.964,11.039,13.238c9.431-9.731,8.321-22.45-4.971-27.139c-20.632-7.306-44.275-2.84-64.322,4.855
c-16.056,6.149-33.525,18.058-36.938,35.628C37.229,145.866,42.802,151,53.768,154h0.006
C50.945,146,51.063,137.347,53.534,129.075z"/>
</g>
<path class="nose" d="M104.781,143.55c-1.708,18.2,27.856,10.402,38.028,9.453c7.191-0.669,13.764-1.581,20.483-2.495
c6.539-0.845,6.792-2.953,0.545-5.095c-7.264-2.53-14.02-5.127-22.008-8.219c-7.048-2.707-21.612-6.956-29.092-5.059
C108.523,133.19,105.436,136.455,104.781,143.55z"/>
<path class="mouth-1" d="M84.079,158.94c-0.91,0.492-2.034,0.106-2.506-0.842c-0.439-0.913,0.036-1.932,0.98-2.321
c0.944-0.421,2.034,0,2.433,0.878C85.422,157.465,84.986,158.519,84.079,158.94z"/>
<path class="mouth-2" d="M88.292,164.63c-0.691,0.739-2.034,0.881-2.651-0.036c-0.688-0.878-0.582-2.07,0.292-2.633
c0.834-0.527,1.961-0.457,2.502,0.212C88.874,162.945,88.984,163.893,88.292,164.63z"/>
<path class="mouth-3" d="M94.43,168.426c-0.472,0.88-1.635,1.263-2.579,0.81c-1.017-0.353-1.236-1.652-0.654-2.462
c0.581-0.842,1.562-0.984,2.469-0.701C94.54,166.458,94.865,167.513,94.43,168.426z"/>
<path class="mouth-4" d="M101.222,170.849c-0.256,0.948-1.309,1.511-2.326,1.266c-1.017-0.283-1.559-1.231-1.163-2.215
c0.329-0.913,1.382-1.475,2.289-1.231C100.967,168.882,101.478,169.866,101.222,170.849z"/>
<path class="mouth-5" d="M108.376,172.151c-0.109,0.984-1.053,1.72-2.107,1.578c-1.053-0.106-1.741-0.983-1.525-2.002
c0.18-0.913,1.126-1.649,2.07-1.543C107.795,170.254,108.486,171.167,108.376,172.151z"/>
<path class="mouth-6" d="M115.64,172.36c0.036,1.019-0.761,1.864-1.814,1.935c-1.053,0.103-1.891-0.739-1.817-1.793
c0.036-0.948,0.837-1.758,1.817-1.829C114.77,170.602,115.568,171.376,115.64,172.36z"/>
<path class="mouth-7" d="M122.831,171.412c0.256,0.948-0.399,1.967-1.452,2.212c-1.017,0.318-1.964-0.418-2.107-1.437
c-0.109-0.983,0.545-1.829,1.452-2.109C121.632,169.83,122.576,170.463,122.831,171.412z"/>
<path class="mouth-8" d="M129.587,168.953c0.508,0.878,0.146,2.002-0.837,2.494c-0.907,0.598-2.034,0.035-2.393-0.913
c-0.329-0.948,0.107-1.864,0.871-2.388C128.025,167.722,129.115,168.075,129.587,168.953z"/>
<path class="mouth-9" d="M135.252,164.665c0.798,0.669,0.834,1.864,0.073,2.671c-0.761,0.81-1.888,0.775-2.542-0.103
c-0.545-0.739-0.545-1.932,0-2.568C133.402,163.999,134.491,164.035,135.252,164.665z"/>
<path class="mouth-10" d="M138.994,158.763c0.944,0.318,1.416,1.408,1.017,2.426c-0.399,1.019-1.452,1.369-2.323,0.842
c-0.874-0.527-1.346-1.617-1.053-2.426C136.961,158.763,138.014,158.413,138.994,158.763z"/>
<path class="eye_left" d="M94.939,125.986c4.396-2.494,0.581-8.746-3.775-6.535
C86.585,121.769,90.037,128.76,94.939,125.986z"/>
<path class="eye_right" d="M127.663,123.63c4.393-2.456,0.582-8.746-3.778-6.497
C119.309,119.451,122.758,126.407,127.663,123.63z"/>
<path class="button_top" d="M134.053,227.38c13.039-2.391,12.205-20.626-2.323-18.904
C116.767,210.306,119.891,229.978,134.053,227.38z"/>
<path class="button_bottom" d="M130.022,262.687c11.696,1.157,17.289-16.336,5.267-19.219
C123.522,240.659,115.205,261.176,130.022,262.687z"/>
</g>
</svg>
Can someone point me as to why is it not working in mozilla?
You are missing the standard syntax without prefixes, that's why doesn't work on non--webkit- browsers that don't require prefixes.
Browser support for animation and transform
Updated CodePen
.snowman_body {
fill: #F5ECC3;
-webkit-animation: body-drop 0.5s ease-in forwards;
animation: body-drop 0.5s ease-in forwards;
}
.scarf {
fill: #EF3C3C;
opacity: 0;
-webkit-animation: scale 0.5s ease 1s forwards;
animation: scale 0.5s ease 1s forwards;
-webkit-transform-origin: 55px 165px;
animation: scale 0.5s ease 1s forwards;
}
.scarf_knot {
fill: #EF3C3C;
opacity: 0;
-webkit-animation: scale 0.3s ease 1.5s forwards;
animation: scale 0.3s ease 1.5s forwards;
-webkit-transform-origin: 92px 190px;
transform-origin: 92px 190px;
}
.snowman_head {
fill: #F5ECC3;
-webkit-transform: translateY(-303px);
transform: translateY(-303px);
-webkit-animation: body-drop 0.5s ease-in 0.2s forwards;
animation: body-drop 0.5s ease-in 0.2s forwards;
}
#hat {
-webkit-transform: translateY(-303px);
transform: translateY(-303px);
-webkit-animation: body-drop 0.5s ease-in 0.3s forwards;
animation: body-drop 0.5s ease-in 0.3s forwards;
}
.hat-top {
fill: #5B4831;
}
.hat-ribbon {
fill: #EF3C3C;
}
.hat-bottom {
fill: #5B4831;
}
.nose {
fill: #EF3C3C;
opacity: 0;
-webkit-animation: scale 0.3s ease 2.5s forwards;
animation: scale 0.3s ease 2.5s forwards;
-webkit-transform-origin: 104px 142px;
transform-origin: 104px 142px;
}
.mouth-1 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 3.1s forwards;
animation: scale 0.1s ease 3.1s forwards;
-webkit-transform-origin: 82px 156px;
transform-origin: 82px 156px;
}
.mouth-2 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 3.2s forwards;
animation: scale 0.1s ease 3.2s forwards;
-webkit-transform-origin: 86px 162px;
transform-origin: 86px 162px;
}
.mouth-3 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 3.3s forwards;
animation: scale 0.1s ease 3.3s forwards;
-webkit-transform-origin: 92px 167px;
transform-origin: 92px 167px;
}
.mouth-4 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 3.4s forwards;
animation: scale 0.1s ease 3.4s forwards;
-webkit-transform-origin: 98px 169px;
transform-origin: 98px 169px;
}
.mouth-5 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 3.5s forwards;
animation: scale 0.1s ease 3.5s forwards;
-webkit-transform-origin: 106px 171px;
transform-origin: 106px 171px;
}
.mouth-6 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 3.6s forwards;
nimation: scale 0.1s ease 3.6s forwards;
-webkit-transform-origin: 113px 171px;
transform-origin: 113px 171px;
}
.mouth-7 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 3.7s forwards;
animation: scale 0.1s ease 3.7s forwards;
-webkit-transform-origin: 120px 171px;
transform-origin: 120px 171px;
}
.mouth-8 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 3.8s forwards;
animation: scale 0.1s ease 3.8s forwards;
-webkit-transform-origin: 127px 169px;
transform-origin: 127px 169px;
}
.mouth-9 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 3.9s forwards;
animation: scale 0.1s ease 3.9s forwards;
-webkit-transform-origin: 132px 165px;
transform-origin: 132px 165px;
}
.mouth-10 {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.1s ease 4.0s forwards;
animation: scale 0.1s ease 4.0s forwards;
-webkit-transform-origin: 137px 160px;
transform-origin: 137px 160px;
}
.eye_left {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.2s ease 2.7s forwards;
animation: scale 0.2s ease 2.7s forwards;
-webkit-transform-origin: 92px 122px;
transform-origin: 92px 122px;
}
.eye_right {
fill: #5B4831;
opacity: 0;
-webkit-animation: scale 0.2s ease 2.9s forwards;
animation: scale 0.2s ease 2.9s forwards;
-webkit-transform-origin: 125px 120px;
transform-origin: 125px 120px;
}
.button_top {
fill: #09B0A6;
opacity: 0;
-webkit-animation: scale 0.3s ease 2.2s forwards;
animation: scale 0.3s ease 2.2s forwards;
-webkit-transform-origin: 132px 217px;
transform-origin: 132px 217px;
}
.button_bottom {
fill: #09B0A6;
opacity: 0;
-webkit-animation: scale 0.3s ease 2s forwards;
animation: scale 0.3s ease 2s forwards;
-webkit-transform-origin: 132px 252px;
transform-origin: 132px 252px;
}
#-webkit-keyframes body-drop {
0% {
transform: translateY(-303px);
}
100% {
transform: translateY(0px);
}
}
#keyframes body-drop {
0% {
transform: translateY(-303px);
}
100% {
transform: translateY(0px);
}
}
#-webkit-keyframes scale {
0% {
opacity: 1;
transform: scale(0, 0);
}
100% {
opacity: 1;
transform: scale(1, 1);
}
}
#keyframes scale {
0% {
opacity: 1;
transform: scale(0, 0);
}
100% {
opacity: 1;
transform: scale(1, 1);
}
}