SVG animated icon make bigger size with css - css

In my project I use svg icon. but this icon is very small. I am needed to increase the size of the display.
Below I inserted image for the references. I am trying to big this icon. in this tag also present in the code.
I am needed to increase the size of the display.
So can I use css to bigger this svg. I am use many ways and seen many example for increasing the size of the svg but all are not working in a right way.
I Symbol definition is
<symbol id="saturnGif">
<g style="transform-origin: 50px 50px 0px;">
<g style="transform-origin: 50px 50px 0px; transform: scale(0.6);">
<g class="ld ld-swim-px" style="transform-origin: 50px 50px 0px; animation-duration: 1s; animation-delay: 4.23412s; animation-direction: normal;">
<g>
<g style="transform-origin: 50px 50px 0px;">
<path class="st10" d="M50,40.6c-23.5,0-42.5,4.2-42.5,9.4h14.2c0-3.5,12.7-6.3,28.3-6.3s28.3,2.8,28.3,6.3h14.2 C92.5,44.8,73.5,40.6,50,40.6z" fill="#f36c00" style="fill: rgb(243, 108, 0);"></path>
</g>
<g style="transform-origin: 50px 50px 0px;"><circle class="st1" cx="50" cy="50" r="25.7" fill="rgb(248, 178, 106)" style="fill: rgb(248, 178, 106);"></circle></g>
<g style="transform-origin: 50px 50px 0px;">
<path class="st28" d="M50,56.3c15.6,0,28.3-2.8,28.3-6.3H21.7C21.7,53.5,34.4,56.3,50,56.3z">
</path>
</g>
<g style="transform-origin: 50px 50px 0px;">
<path class="st10" d="M50,56.3c-15.6,0-28.3-2.8-28.3-6.3H7.5c0,5.2,19,9.4,42.5,9.4s42.5-4.2,42.5-9.4H78.3 C78.3,53.5,65.6,56.3,50,56.3z" fill="#f36c00" style="fill: rgb(243, 108, 0);"></path>
</g>
<metadata xmlns:d="https://loading.io/stock/" style="transform-origin: 50px 50px 0px;">
<d:name style="transform-origin: 50px 50px 0px;">saturn</d:name>
<d:tags style="transform-origin: 50px 50px 0px;">star,solar system,planet,saturn,astrology</d:tags>
<d:license style="transform-origin: 50px 50px 0px;">rf</d:license>
<d:slug style="transform-origin: 50px 50px 0px;">2ez0ua</d:slug>
</metadata>
</g>
</g>
</g>
</g>
</symbol>
and **Style :**
<style type="text/css" style="transform-origin: 50px 50px 0px;">
##keyframes ld-swim-px {
0% {
-webkit-transform: translate(0, 0) rotate(0deg);
transform: translate(0, 0) rotate(0deg);
}
12.5% {
-webkit-transform: translate(1px, -2px) rotate(3deg);
transform: translate(1px, -2px) rotate(3deg);
}
25% {
-webkit-transform: translate(0, -3px) rotate(6deg);
transform: translate(0, -3px) rotate(6deg);
}
37.5% {
-webkit-transform: translate(-1px, -2px) rotate(3deg);
transform: translate(-1px, -2px) rotate(3deg);
}
50% {
-webkit-transform: translate(0, 0) rotate(0deg);
transform: translate(0, 0) rotate(0deg);
}
62.5% {
-webkit-transform: translate(1px, 2px) rotate(-3deg);
transform: translate(1px, 2px) rotate(-3deg);
}
75% {
-webkit-transform: translate(0, 3px) rotate(-6deg);
transform: translate(0, 3px) rotate(-6deg);
}
87.5% {
-webkit-transform: translate(-1px, 2px) rotate(-3deg);
transform: translate(-1px, 2px) rotate(-3deg);
}
100% {
-webkit-transform: translate(0, 0) rotate(0deg);
transform: translate(0, 0) rotate(0deg);
}
}
##-webkit-keyframes ld-swim-px {
0% {
-webkit-transform: translate(0, 0) rotate(0deg);
transform: translate(0, 0) rotate(0deg);
}
12.5% {
-webkit-transform: translate(1px, -2px) rotate(3deg);
transform: translate(1px, -2px) rotate(3deg);
}
25% {
-webkit-transform: translate(0, -3px) rotate(6deg);
transform: translate(0, -3px) rotate(6deg);
}
37.5% {
-webkit-transform: translate(-1px, -2px) rotate(3deg);
transform: translate(-1px, -2px) rotate(3deg);
}
50% {
-webkit-transform: translate(0, 0) rotate(0deg);
transform: translate(0, 0) rotate(0deg);
}
62.5% {
-webkit-transform: translate(1px, 2px) rotate(-3deg);
transform: translate(1px, 2px) rotate(-3deg);
}
75% {
-webkit-transform: translate(0, 3px) rotate(-6deg);
transform: translate(0, 3px) rotate(-6deg);
}
87.5% {
-webkit-transform: translate(-1px, 2px) rotate(-3deg);
transform: translate(-1px, 2px) rotate(-3deg);
}
100% {
-webkit-transform: translate(0, 0) rotate(0deg);
transform: translate(0, 0) rotate(0deg);
}
}
.ld.ld-swim-px {
-webkit-animation: ld-swim-px 3s infinite linear;
animation: ld-swim-px 3s infinite linear;
}
</style>
<style type="text/css" style="transform-origin: 50px 50px 0px;">
.st0 {
fill: #E0E0E0;
}
.st1 {
fill: #F8B26A;
}
.st2 {
fill: #F5E6C8;
}
.st3 {
fill: #849B87;
}
.st4 {
opacity: 0.2;
fill: #F8B26A;
}
.st5 {
opacity: 0.2;
fill: #ABBD81;
}
.st6 {
opacity: 0.5;
fill: #F8B26A;
}
.st7 {
opacity: 0.5;
fill: #ABBD81;
}
.st8 {
fill: none;
stroke: #E0E0E0;
stroke-width: 4;
stroke-miterlimit: 10;
}
.st9 {
fill: #666666;
}
.st10 {
fill: #F47E60;
}
.st11 {
fill: #ABBD81;
}
.st12 {
fill: #A0C8D7;
}
.st13 {
fill: #333333;
}
.st14 {
fill: #FFFFFF;
stroke: #1A1A1A;
stroke-width: 6;
stroke-linejoin: round;
stroke-miterlimit: 10;
}
.st15 {
fill: #666666;
stroke: #1A1A1A;
stroke-width: 6;
stroke-linejoin: round;
stroke-miterlimit: 10;
}
.st16 {
fill: none;
stroke: #1A1A1A;
stroke-width: 6;
stroke-miterlimit: 10;
}
.st17 {
fill: #1A1A1A;
}
.st18 {
fill: #FFFFFF;
stroke: #1A1A1A;
stroke-width: 6;
stroke-miterlimit: 10;
}
.st19 {
fill: #666666;
stroke: #1A1A1A;
stroke-width: 6;
stroke-miterlimit: 10;
}
.st20 {
fill: none;
stroke: #FFFFFF;
stroke-width: 6;
stroke-miterlimit: 10;
}
.st21 {
fill: none;
stroke: #FFFFFF;
stroke-width: 6;
stroke-linejoin: round;
stroke-miterlimit: 10;
}
.st22 {
fill: #FFFFFF;
}
.st23 {
fill: #353035;
}
.st24 {
fill: #F5E169;
}
.st25 {
fill: none;
stroke: #ABBD81;
stroke-width: 8;
stroke-linecap: round;
stroke-miterlimit: 10;
}
.st26 {
fill: none;
stroke: #E0E0E0;
stroke-width: 8;
stroke-linecap: round;
stroke-miterlimit: 10;
}
.st27 {
fill: #FFDC6C;
}
.st28 {
fill: none;
}
.st29 {
fill: #C59B6D;
}
.st30 {
fill: #E6E6E6;
}
.st31 {
fill: #77A4BD;
}
.st32 {
fill: #6079BD;
}
.st33 {
fill: #405A9E;
}
.st34 {
fill: none;
stroke: #405A9E;
stroke-width: 1.1292;
stroke-miterlimit: 10;
}
.st35 {
fill: #7D5A41;
}
.st36 {
fill: #E6CCAE;
}
.st37 {
fill: #CC632F;
}
.st38 {
fill: #998268;
}
.st39 {
fill: #D4C097;
}
.st40 {
fill: #A8A8A8;
}
.st41 {
fill: #CCCCCC;
}
.st42 {
fill: #999999;
}
.st43 {
stroke: #000000;
stroke-width: 1.8743;
stroke-miterlimit: 10;
}
.st44 {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 1.1246;
stroke-miterlimit: 10;
}
.st45 {
fill: #FFDC6D;
}
.st46 {
fill: #A0C8D7;
stroke: #FFFFFF;
stroke-width: 4;
stroke-linecap: round;
stroke-miterlimit: 10;
}
.st47 {
stroke: #F5E6C8;
stroke-linecap: round;
stroke-linejoin: round;
stroke-miterlimit: 10;
}
.st48 {
fill: none;
stroke: #F5E6C8;
stroke-linecap: round;
stroke-linejoin: round;
stroke-miterlimit: 10;
}
.st49 {
fill: #FFFFFF;
stroke: #F5E6C8;
stroke-linecap: round;
stroke-linejoin: round;
stroke-miterlimit: 10;
}
.st50 {
fill: none;
stroke: #F5E6C8;
stroke-miterlimit: 10;
}
.st51 {
stroke: #F5E6C8;
stroke-width: 3;
stroke-miterlimit: 10;
}
.st52 {
stroke: #F5E6C8;
stroke-miterlimit: 10;
}
.st53 {
fill: none;
stroke: #F5E6C8;
stroke-linecap: round;
stroke-linejoin: round;
}
.st54 {
fill: none;
stroke: #F5E169;
stroke-width: 0.7105;
stroke-miterlimit: 10;
}
.st55 {
fill: none;
stroke: #F5E169;
stroke-width: 0.675;
stroke-miterlimit: 10;
}
.st56 {
fill: none;
stroke: #F5E169;
stroke-width: 0.6594;
stroke-miterlimit: 10;
}
.st57 {
fill: #1A1A1A;
stroke: #F5E169;
stroke-width: 0.8;
stroke-miterlimit: 10;
}
.st58 {
fill: #FF0000;
}
.st59 {
fill: #D686A5;
}
.st60 {
fill: #AFA5CD;
}
.st61 {
opacity: 0.5;
fill: none;
}
.st62 {
opacity: 0.2;
fill: #849B87;
}
.st63 {
opacity: 0.2;
fill: #A0C8D7;
}
.st64 {
opacity: 0.2;
fill: #77A4BD;
}
.st65 {
opacity: 0.5;
fill: #849B87;
}
.st66 {
opacity: 0.5;
fill: #A0C8D7;
}
.st67 {
opacity: 0.5;
fill: #77A4BD;
}
.st68 {
fill: none;
stroke: #333333;
stroke-width: 4;
stroke-miterlimit: 10;
}
.st69 {
fill: #F5E6C8;
stroke: #333333;
stroke-width: 3;
stroke-miterlimit: 10;
}
</style>
Image for Reference

You will need to give the symbol a viewBox attribute:
<symbol id="saturnGif" viewBox="24 34 52 32">
Then when you use the symbol you give the <use> element a width and a height.
<use xlink:href="#saturnGif" width="104" height="64" />
Also you can position the <use> with an x and y attributes.
<svg viewBox="0 0 52 32">
<symbol id="saturnGif" viewBox="24 34 52 32">
svg{border:1px solid}
<svg viewBox="0 0 200 200">
<symbol id="saturnGif" viewBox="7 24 87 53">
<path class="st10" d="M50,40.6c-23.5,0-42.5,4.2-42.5,9.4h14.2c0-3.5,12.7-6.3,28.3-6.3s28.3,2.8,28.3,6.3h14.2 C92.5,44.8,73.5,40.6,50,40.6z" fill="#f36c00" stroke="#f36c00" ></path>
<circle class="st1" cx="50" cy="50" r="25.7" fill="rgb(248, 178, 106)" ></circle>
<path class="st10" d="M50,56.3c-15.6,0-28.3-2.8-28.3-6.3H7.5c0,5.2,19,9.4,42.5,9.4s42.5-4.2,42.5-9.4H78.3 C78.3,53.5,65.6,56.3,50,56.3z" fill="#f36c00" stroke="#f36c00" ></path>
</symbol>
<use xlink:href="#saturnGif" x="13" y="48" width="174" height="106" >
</use>
</svg>
If you need to use this symbol alone like an inline icon you may use the same viewBox for both svg and symbol. If you are using an svg element without width and height but with a viewBox attribute the svg element will take the width of the container element.
<svg viewBox="0 0 52 32">
<symbol id="saturnGif" viewBox="24 34 52 32">...</symbol>
</svg>
.......
<div class="container">
<svg viewBox="0 0 52 32"><use xlink:href="#saturnGif" /></svg>
</div>
Next comes an animated version where I'm using SMIL animations. I'm animating the use element: The values attribute represent the stages of the animation. I'm animating the attribute transform: attributeName="transform" type="rotate" and the animation's duration is 4 seconds: dur="4s". The animation happens around the point {x:100,y:100}:
values="0,100,100; -5,100,100; 0,100,100; 5,100,100; 0,100,100"
svg{border:1px solid;width:90vh}
<svg viewBox="0 0 200 200">
<symbol id="saturnGif" viewBox="7 24 87 53">
<path class="st10" d="M50,40.6c-23.5,0-42.5,4.2-42.5,9.4h14.2c0-3.5,12.7-6.3,28.3-6.3s28.3,2.8,28.3,6.3h14.2 C92.5,44.8,73.5,40.6,50,40.6z" fill="#f36c00" stroke="#f36c00" ></path>
<circle class="st1" cx="50" cy="50" r="25.7" fill="rgb(248, 178, 106)" ></circle>
<path class="st10" d="M50,56.3c-15.6,0-28.3-2.8-28.3-6.3H7.5c0,5.2,19,9.4,42.5,9.4s42.5-4.2,42.5-9.4H78.3 C78.3,53.5,65.6,56.3,50,56.3z" fill="#f36c00" stroke="#f36c00" ></path>
</symbol>
<use xlink:href="#saturnGif" x="13" y="48" width="174" height="106" >
<animateTransform
attributeType="XML"
attributeName="transform"
type="rotate"
values="0,100,100; -5,100,100; 0,100,100; 5,100,100; 0,100,100"
dur="4s"
repeatCount="indefinite" />
</use>
</svg>

Related

CSS Animation Currently Only working in Firefox, not Chrome or Safari

Currently working on a simple animation to show a slide being inserted into a viewmaster.
it works in firefox, but not chrome or safari. I haven't tested other browsers yet. I've included -webkit-animation as well as #-webkit-keyframes. I've been trying to find other similar questions, but no luck so far.
html,
body {
width: 100%;
height: 100%;
background-color: #F2EFEB;
}
.intro-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 80%;
}
.logo-bottom,
.logo-top {
display: inline-block;
position: relative;
}
.logo-bottom {
-o-animation: logo-anim-bottom 1.5s;
-ms-animation: logo-anim-bottom 1.5s;
-moz-animation: logo-anim-bottom 1.5s;
-webkit-animation: logo-anim-bottom 1.5s infinite;
animation: logo-anim-bottom 1.5s infinite;
}
.logo-top {
-o-animation: logo-anim-top 1.5;
-ms-animation: logo-anim-top 1.5;
-moz-animation: logo-anim-top 1.5s;
-webkit-animation: logo-anim-top 1.5 infinite;
animation: logo-anim-top 1.5s infinite;
}
#-ms-keyframes logo-anim-bottom {
0% {
top: 0;
}
26% {
top: 0;
}
29% {
top: 15px;
}
40% {
top: 0;
}
}
#-o-keyframes logo-anim-bottom {
0% {
top: 0;
}
26% {
top: 0;
}
29% {
top: 15px;
}
40% {
top: 0;
}
}
#-moz-keyframes logo-anim-bottom {
0% {
top: 0;
}
26% {
top: 0;
}
29% {
top: 15px;
}
40% {
top: 0;
}
}
#-ms-keyframes logo-anim-bottom {
0% {
top: 0;
}
26% {
top: 0;
}
29% {
top: 15px;
}
40% {
top: 0;
}
}
#-webkit-keyframes logo-anim-bottom {
0% {
top: 0;
}
26% {
top: 0;
}
29% {
top: 15px;
}
40% {
top: 0;
}
}
#keyframes logo-anim-bottom {
0% {
top: 0;
}
26% {
top: 0;
}
29% {
top: 15px;
}
40% {
top: 0;
}
}
#-ms-keyframes logo-anim-top {
0% {
top: -55px;
}
25% {
top: -75px;
}
30% {
top: 15px;
}
40% {
top: 0;
}
}
#-o-keyframes logo-anim-top {
0% {
top: -55px;
}
25% {
top: -75px;
}
30% {
top: 15px;
}
40% {
top: 0;
}
}
#-moz-keyframes logo-anim-top {
0% {
top: -55px;
}
25% {
top: -75px;
}
30% {
top: 15px;
}
40% {
top: 0;
}
}
#-ms-keyframes logo-anim-top {
0% {
top: -55px;
}
25% {
top: -75px;
}
30% {
top: 15px;
}
40% {
top: 0;
}
}
#-webkit-keyframes logo-anim-top {
0% {
top: -55px;
}
25% {
top: -75px;
}
30% {
top: 15px;
}
40% {
top: 0;
}
}
#keyframes logo-anim-top {
0% {
top: -55px;
}
25% {
top: -75px;
}
30% {
top: 15px;
}
40% {
top: 0;
}
}
.red {
fill: #E491C5;
}
.yellow {
fill: #FDF388;
}
.dark-yellow {
fill: #e0d580;
}
.brown {
fill: #633E17;
}
.pure-white {
fill: #ffffff;
}
.dark-grey {
fill: #30332a;
}
.white {
fill: #F2EFEB;
}
.black {
fill: #181914;
}
<div class="intro-container">
<div class="animate__animated animate__fadeOut animate__fast animate__delay-1s">
<svg width="250px" height="350px" viewBox="0 0 250 350" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="slide" class="logo-top">
<circle class="pure-white" cx="126.01" cy="205.99" r="61.21"/>
<path class="dark-grey" d="M134.27,154.76v11.4c0,1.42-1.15,2.56-2.56,2.56h-11.4c-1.42,0-2.56-1.15-2.56-2.56v-11.4
c0-1.42,1.15-2.56,2.56-2.56h11.4C133.12,152.2,134.27,153.34,134.27,154.76z"/>
<path class="dark-grey" d="M158.9,163.6l-4.31,10.55c-0.54,1.31-2.03,1.94-3.34,1.4l-10.55-4.31c-1.31-0.54-1.94-2.03-1.4-3.34
l4.31-10.55c0.54-1.31,2.03-1.94,3.34-1.4l10.55,4.31C158.81,160.79,159.44,162.29,158.9,163.6z"/>
<path class="dark-grey" d="M134.27,244.97v11.4c0,1.42-1.15,2.56-2.56,2.56h-11.4c-1.42,0-2.56-1.15-2.56-2.56v-11.4
c0-1.42,1.15-2.56,2.56-2.56h11.4C133.12,242.41,134.27,243.56,134.27,244.97z"/>
<path class="dark-grey" d="M88.35,200.3v11.4c0,1.42-1.15,2.56-2.56,2.56h-11.4c-1.42,0-2.56-1.15-2.56-2.56v-11.4
c0-1.42,1.15-2.56,2.56-2.56h11.4C87.2,197.73,88.35,198.88,88.35,200.3z"/>
<path class="dark-grey" d="M178.45,200.3v11.4c0,1.42-1.15,2.56-2.56,2.56h-11.4c-1.42,0-2.56-1.15-2.56-2.56v-11.4
c0-1.42,1.15-2.56,2.56-2.56h11.4C177.31,197.73,178.45,198.88,178.45,200.3z"/>
<path class="dark-grey" d="M170.99,174.6l4.56,10.45c0.57,1.3-0.03,2.81-1.32,3.37l-10.45,4.56c-1.3,0.57-2.81-0.03-3.37-1.32
l-4.56-10.45c-0.57-1.3,0.03-2.81,1.32-3.37l10.45-4.56C168.91,172.71,170.42,173.3,170.99,174.6z"/>
<path class="dark-grey" d="M96.16,174.53l-4.31-10.55c-0.54-1.31,0.09-2.81,1.4-3.34l10.55-4.31c1.31-0.54,2.81,0.09,3.34,1.4
l4.31,10.55c0.54,1.31-0.09,2.81-1.4,3.34l-10.55,4.31C98.19,176.46,96.7,175.84,96.16,174.53z"/>
<path class="dark-grey" d="M75.24,185.43l4.56-10.45c0.57-1.3,2.08-1.89,3.37-1.32l10.45,4.56c1.3,0.57,1.89,2.08,1.32,3.37l-4.56,10.45
c-0.57,1.3-2.08,1.89-3.37,1.32l-10.45-4.56C75.27,188.24,74.68,186.73,75.24,185.43z"/>
<path class="dark-grey" d="M93.43,247.92l4.31-10.55c0.54-1.31,2.03-1.94,3.34-1.4l10.55,4.31c1.31,0.54,1.94,2.03,1.4,3.34l-4.31,10.55
c-0.54,1.31-2.03,1.94-3.34,1.4l-10.55-4.31C93.52,250.72,92.89,249.23,93.43,247.92z"/>
<path class="dark-grey" d="M81.34,236.92l-4.56-10.45c-0.57-1.3,0.03-2.81,1.32-3.37l10.45-4.56c1.3-0.57,2.81,0.03,3.37,1.32
l4.56,10.45c0.57,1.3-0.03,2.81-1.32,3.37l-10.45,4.56C83.42,238.81,81.91,238.21,81.34,236.92z"/>
<path class="dark-grey" d="M154.29,237.9l4.31,10.55c0.54,1.31-0.09,2.81-1.4,3.34l-10.55,4.31c-1.31,0.54-2.81-0.09-3.34-1.4
l-4.31-10.55c-0.54-1.31,0.09-2.81,1.4-3.34l10.55-4.31C152.25,235.96,153.75,236.58,154.29,237.9z"/>
<path class="dark-grey" d="M175.22,226.99l-4.56,10.45c-0.57,1.3-2.08,1.89-3.37,1.32l-10.45-4.56c-1.3-0.57-1.89-2.08-1.32-3.37
l4.56-10.45c0.57-1.3,2.08-1.89,3.37-1.32l10.45,4.56C175.19,224.18,175.78,225.69,175.22,226.99z"/>
</g>
<g id="viewmaster" class="logo-bottom">
<g>
<path class="yellow" d="M212.43,184.86c2.66,6.89,8.95,11.97,16.53,12.9c-2.38,2.14-5.03,3.61-7.25,4.59
c-2.78-2.16-6.23-3.52-10.01-3.68c-0.61-0.08-1.22-0.14-1.83-0.21l-0.64-12.25C210.33,185.81,211.39,185.36,212.43,184.86z"/>
<path class="yellow" d="M213.71,177.53L213.71,177.53c0-9.79,7.94-17.73,17.73-17.73s17.73,7.94,17.73,17.73s-7.94,17.73-17.73,17.73
C221.66,195.26,213.73,187.32,213.71,177.53z M231.45,171.37c-3.41-0.01-6.18,2.75-6.18,6.16c0,3.4,2.75,6.15,6.14,6.16
c3.4,0.01,6.17-2.74,6.18-6.14C237.6,174.15,234.85,171.38,231.45,171.37L231.45,171.37z"/>
<path class="dark-yellow" d="M217.81,177.53C217.81,177.53,217.81,177.53,217.81,177.53c0-7.53,6.11-13.64,13.64-13.64
s13.64,6.11,13.64,13.64c0,7.53-6.11,13.64-13.64,13.64C223.92,191.17,217.81,185.06,217.81,177.53z M221.2,177.53
c0,0.01,0,0.01,0,0.02c0.01,5.67,4.62,10.26,10.29,10.25c5.67-0.01,10.26-4.62,10.25-10.29c-0.01-5.67-4.62-10.26-10.29-10.25
C225.79,167.28,221.2,171.87,221.2,177.53z"/>
<circle class="yellow" cx="231.45" cy="177.53" r="11.95"/>
</g>
<path class="red" d="M44.2,198.19c0.21-4.59,0.58-12.6,0.88-18.43c0.46-8.64,4.42-11.11,6.96-12.67
c2.54-1.56,17.14-0.91,28.13-0.91c11.95,7.02,28.25,9.14,45.84,9.75c17.59-0.64,33.89-2.73,45.83-9.75c11,0,25.6-0.64,28.14,0.91
c2.54,1.55,6.5,4.06,6.95,12.67c0.3,5.81,0.66,13.83,0.86,18.43C153.45,191.72,98.54,191.72,44.2,198.19z"/>
<path class="red" d="M207.85,256.46c-0.89,14.56-6.66,47.82-8.56,52.07c-2.08,4.67-8.12,5.2-8.12,5.2H60.86
c0,0-6.09-0.52-8.12-5.2c-1.85-4.26-7.66-37.51-8.57-52.06c27.09,3.22,54.34,4.85,81.63,4.84
C153.22,261.3,180.62,259.67,207.85,256.46z"/>
<path class="red" d="M25.89,216.15v22.34c0.01,8.14,6.46,14.82,14.59,15.11c28.3,3.53,56.79,5.29,85.31,5.29
c28.66,0,57.29-1.77,85.73-5.29c8.14-0.29,14.59-6.97,14.59-15.11v-22.34c-0.01-8.14-6.46-14.81-14.59-15.1
c-56.79-7.11-114.24-7.11-171.03,0C32.35,201.33,25.9,208.01,25.89,216.15z M33.16,216.16c0.02-4.35,3.54-7.87,7.89-7.88
c56.44-7.13,113.55-7.13,169.99,0c4.33,0.03,7.83,3.54,7.85,7.87v22.34c-0.02,4.35-3.54,7.87-7.89,7.89
c-56.44,7.08-113.55,7.08-169.99,0c-4.33-0.04-7.83-3.55-7.85-7.88V216.16z"/>
<path id="_x3C_Path_x3E_" class="dark-grey" d="M41.06,208.28c56.44-7.13,113.55-7.13,169.99,0c4.33,0.03,7.83,3.54,7.85,7.87v22.34
c-0.02,4.35-3.54,7.87-7.89,7.89c-56.44,7.08-113.55,7.08-169.99,0c-4.33-0.04-7.83-3.55-7.85-7.88v-22.34
C33.18,211.81,36.71,208.29,41.06,208.28z"/>
</g>
</svg>
</div>
</div>
You can use tranform translateY() instead of top values and it should work cross-browser. Pretty sure Chrome does not respect the position relative for child SVG elements.
html,
body {
width: 100%;
height: 100%;
background-color: #F2EFEB;
}
.intro-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 80%;
}
.logo-bottom,
.logo-top {
display: inline-block;
position: relative;
}
.logo-bottom {
-o-animation: logo-anim-bottom 1.5s;
-ms-animation: logo-anim-bottom 1.5s;
-moz-animation: logo-anim-bottom 1.5s;
-webkit-animation: logo-anim-bottom 1.5s infinite;
animation: logo-anim-bottom 1.5s infinite;
}
.logo-top {
-o-animation: logo-anim-top 1.5;
-ms-animation: logo-anim-top 1.5;
-moz-animation: logo-anim-top 1.5s;
-webkit-animation: logo-anim-top 1.5 infinite;
animation: logo-anim-top 1.5s infinite;
}
#-ms-keyframes logo-anim-bottom {
0% {
transform: translateY(0)
}
26% {
transform: translateY(0)
}
29% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
#-o-keyframes logo-anim-bottom {
0% {
transform: translateY(0)
}
26% {
transform: translateY(0)
}
29% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
#-moz-keyframes logo-anim-bottom {
0% {
transform: translateY(0)
}
26% {
transform: translateY(0)
}
29% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
#-webkit-keyframes logo-anim-bottom {
0% {
transform: translateY(0)
}
26% {
transform: translateY(0)
}
29% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
#keyframes logo-anim-bottom {
0% {
transform: translateY(0)
}
26% {
transform: translateY(0)
}
29% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
#-ms-keyframes logo-anim-top {
0% {
transform: translateY(-55px)
}
25% {
transform: translateY(-75px)
}
30% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
#-o-keyframes logo-anim-top {
0% {
transform: translateY(-55px)
}
25% {
transform: translateY(-75px)
}
30% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
#-moz-keyframes logo-anim-top {
0% {
transform: translateY(-55px)
}
25% {
transform: translateY(-75px)
}
30% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
#-webkit-keyframes logo-anim-top {
0% {
transform: translateY(-55px)
}
25% {
transform: translateY(-75px)
}
30% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
#keyframes logo-anim-top {
0% {
transform: translateY(-55px)
}
25% {
transform: translateY(-75px)
}
30% {
transform: translateY(15px)
}
40% {
transform: translateY(0)
}
}
.red {
fill: #E491C5;
}
.yellow {
fill: #FDF388;
}
.dark-yellow {
fill: #e0d580;
}
.brown {
fill: #633E17;
}
.pure-white {
fill: #ffffff;
}
.dark-grey {
fill: #30332a;
}
.white {
fill: #F2EFEB;
}
.black {
fill: #181914;
}
<div class="intro-container">
<div class="animate__animated animate__fadeOut animate__fast animate__delay-1s">
<svg width="250px" height="350px" viewBox="0 0 250 350" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="slide" class="logo-top">
<circle class="pure-white" cx="126.01" cy="205.99" r="61.21"/>
<path class="dark-grey" d="M134.27,154.76v11.4c0,1.42-1.15,2.56-2.56,2.56h-11.4c-1.42,0-2.56-1.15-2.56-2.56v-11.4
c0-1.42,1.15-2.56,2.56-2.56h11.4C133.12,152.2,134.27,153.34,134.27,154.76z"/>
<path class="dark-grey" d="M158.9,163.6l-4.31,10.55c-0.54,1.31-2.03,1.94-3.34,1.4l-10.55-4.31c-1.31-0.54-1.94-2.03-1.4-3.34
l4.31-10.55c0.54-1.31,2.03-1.94,3.34-1.4l10.55,4.31C158.81,160.79,159.44,162.29,158.9,163.6z"/>
<path class="dark-grey" d="M134.27,244.97v11.4c0,1.42-1.15,2.56-2.56,2.56h-11.4c-1.42,0-2.56-1.15-2.56-2.56v-11.4
c0-1.42,1.15-2.56,2.56-2.56h11.4C133.12,242.41,134.27,243.56,134.27,244.97z"/>
<path class="dark-grey" d="M88.35,200.3v11.4c0,1.42-1.15,2.56-2.56,2.56h-11.4c-1.42,0-2.56-1.15-2.56-2.56v-11.4
c0-1.42,1.15-2.56,2.56-2.56h11.4C87.2,197.73,88.35,198.88,88.35,200.3z"/>
<path class="dark-grey" d="M178.45,200.3v11.4c0,1.42-1.15,2.56-2.56,2.56h-11.4c-1.42,0-2.56-1.15-2.56-2.56v-11.4
c0-1.42,1.15-2.56,2.56-2.56h11.4C177.31,197.73,178.45,198.88,178.45,200.3z"/>
<path class="dark-grey" d="M170.99,174.6l4.56,10.45c0.57,1.3-0.03,2.81-1.32,3.37l-10.45,4.56c-1.3,0.57-2.81-0.03-3.37-1.32
l-4.56-10.45c-0.57-1.3,0.03-2.81,1.32-3.37l10.45-4.56C168.91,172.71,170.42,173.3,170.99,174.6z"/>
<path class="dark-grey" d="M96.16,174.53l-4.31-10.55c-0.54-1.31,0.09-2.81,1.4-3.34l10.55-4.31c1.31-0.54,2.81,0.09,3.34,1.4
l4.31,10.55c0.54,1.31-0.09,2.81-1.4,3.34l-10.55,4.31C98.19,176.46,96.7,175.84,96.16,174.53z"/>
<path class="dark-grey" d="M75.24,185.43l4.56-10.45c0.57-1.3,2.08-1.89,3.37-1.32l10.45,4.56c1.3,0.57,1.89,2.08,1.32,3.37l-4.56,10.45
c-0.57,1.3-2.08,1.89-3.37,1.32l-10.45-4.56C75.27,188.24,74.68,186.73,75.24,185.43z"/>
<path class="dark-grey" d="M93.43,247.92l4.31-10.55c0.54-1.31,2.03-1.94,3.34-1.4l10.55,4.31c1.31,0.54,1.94,2.03,1.4,3.34l-4.31,10.55
c-0.54,1.31-2.03,1.94-3.34,1.4l-10.55-4.31C93.52,250.72,92.89,249.23,93.43,247.92z"/>
<path class="dark-grey" d="M81.34,236.92l-4.56-10.45c-0.57-1.3,0.03-2.81,1.32-3.37l10.45-4.56c1.3-0.57,2.81,0.03,3.37,1.32
l4.56,10.45c0.57,1.3-0.03,2.81-1.32,3.37l-10.45,4.56C83.42,238.81,81.91,238.21,81.34,236.92z"/>
<path class="dark-grey" d="M154.29,237.9l4.31,10.55c0.54,1.31-0.09,2.81-1.4,3.34l-10.55,4.31c-1.31,0.54-2.81-0.09-3.34-1.4
l-4.31-10.55c-0.54-1.31,0.09-2.81,1.4-3.34l10.55-4.31C152.25,235.96,153.75,236.58,154.29,237.9z"/>
<path class="dark-grey" d="M175.22,226.99l-4.56,10.45c-0.57,1.3-2.08,1.89-3.37,1.32l-10.45-4.56c-1.3-0.57-1.89-2.08-1.32-3.37
l4.56-10.45c0.57-1.3,2.08-1.89,3.37-1.32l10.45,4.56C175.19,224.18,175.78,225.69,175.22,226.99z"/>
</g>
<g id="viewmaster" class="logo-bottom">
<g>
<path class="yellow" d="M212.43,184.86c2.66,6.89,8.95,11.97,16.53,12.9c-2.38,2.14-5.03,3.61-7.25,4.59
c-2.78-2.16-6.23-3.52-10.01-3.68c-0.61-0.08-1.22-0.14-1.83-0.21l-0.64-12.25C210.33,185.81,211.39,185.36,212.43,184.86z"/>
<path class="yellow" d="M213.71,177.53L213.71,177.53c0-9.79,7.94-17.73,17.73-17.73s17.73,7.94,17.73,17.73s-7.94,17.73-17.73,17.73
C221.66,195.26,213.73,187.32,213.71,177.53z M231.45,171.37c-3.41-0.01-6.18,2.75-6.18,6.16c0,3.4,2.75,6.15,6.14,6.16
c3.4,0.01,6.17-2.74,6.18-6.14C237.6,174.15,234.85,171.38,231.45,171.37L231.45,171.37z"/>
<path class="dark-yellow" d="M217.81,177.53C217.81,177.53,217.81,177.53,217.81,177.53c0-7.53,6.11-13.64,13.64-13.64
s13.64,6.11,13.64,13.64c0,7.53-6.11,13.64-13.64,13.64C223.92,191.17,217.81,185.06,217.81,177.53z M221.2,177.53
c0,0.01,0,0.01,0,0.02c0.01,5.67,4.62,10.26,10.29,10.25c5.67-0.01,10.26-4.62,10.25-10.29c-0.01-5.67-4.62-10.26-10.29-10.25
C225.79,167.28,221.2,171.87,221.2,177.53z"/>
<circle class="yellow" cx="231.45" cy="177.53" r="11.95"/>
</g>
<path class="red" d="M44.2,198.19c0.21-4.59,0.58-12.6,0.88-18.43c0.46-8.64,4.42-11.11,6.96-12.67
c2.54-1.56,17.14-0.91,28.13-0.91c11.95,7.02,28.25,9.14,45.84,9.75c17.59-0.64,33.89-2.73,45.83-9.75c11,0,25.6-0.64,28.14,0.91
c2.54,1.55,6.5,4.06,6.95,12.67c0.3,5.81,0.66,13.83,0.86,18.43C153.45,191.72,98.54,191.72,44.2,198.19z"/>
<path class="red" d="M207.85,256.46c-0.89,14.56-6.66,47.82-8.56,52.07c-2.08,4.67-8.12,5.2-8.12,5.2H60.86
c0,0-6.09-0.52-8.12-5.2c-1.85-4.26-7.66-37.51-8.57-52.06c27.09,3.22,54.34,4.85,81.63,4.84
C153.22,261.3,180.62,259.67,207.85,256.46z"/>
<path class="red" d="M25.89,216.15v22.34c0.01,8.14,6.46,14.82,14.59,15.11c28.3,3.53,56.79,5.29,85.31,5.29
c28.66,0,57.29-1.77,85.73-5.29c8.14-0.29,14.59-6.97,14.59-15.11v-22.34c-0.01-8.14-6.46-14.81-14.59-15.1
c-56.79-7.11-114.24-7.11-171.03,0C32.35,201.33,25.9,208.01,25.89,216.15z M33.16,216.16c0.02-4.35,3.54-7.87,7.89-7.88
c56.44-7.13,113.55-7.13,169.99,0c4.33,0.03,7.83,3.54,7.85,7.87v22.34c-0.02,4.35-3.54,7.87-7.89,7.89
c-56.44,7.08-113.55,7.08-169.99,0c-4.33-0.04-7.83-3.55-7.85-7.88V216.16z"/>
<path id="_x3C_Path_x3E_" class="dark-grey" d="M41.06,208.28c56.44-7.13,113.55-7.13,169.99,0c4.33,0.03,7.83,3.54,7.85,7.87v22.34
c-0.02,4.35-3.54,7.87-7.89,7.89c-56.44,7.08-113.55,7.08-169.99,0c-4.33-0.04-7.83-3.55-7.85-7.88v-22.34
C33.18,211.81,36.71,208.29,41.06,208.28z"/>
</g>
</svg>
</div>
</div>

SVG circle with multiple origin for stroke animation

I have a simple donut graph with fill-in animation. The problem is that I get two separate paths. (Es. 10% bar gives me 0-10% and then space and then another 10%.
I have tried playing around with the different variables but I can't figure out what I am doing wrong, any help? I have used this: https://codepen.io/matttherat/pen/EeMaEw?editors=1100
Here's a screen:
.svg-item {
flex: 1;
font-size: 16px;
max-width: 120px;
animation: donutfade 1s;
margin: 0 auto;
}
.data-des {
font-size: 0.7em;
display: block;
font-weight: bold;
text-align: center;
margin-top: 10px;
}
#keyframes donutfade {
/* this applies to the whole svg item wrapper */
0% {
opacity: 0.2;
}
100% {
opacity: 1;
}
}
.donut-ring-ext {
stroke: #50b180;
}
.donut-segment {
transform-origin: center;
}
.donut-segment-2 {
stroke: #a8df8a;
animation: donut1 1s;
}
.donut-segment-3 {
stroke: #a8df8a;
animation: donut2 1s;
}
.donut-segment-4 {
stroke: #a8df8a;
animation: donut3 1s;
}
.donut-percent {
color: #3c8560;
animation: donutfadelong 1s;
}
#keyframes donutfadelong {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#keyframes donut1 {
0% {
stroke-dasharray: 0 100;
}
100% {
stroke-dasharray: 10 90;
}
}
#keyframes donut2 {
0% {
stroke-dasharray: 0, 100;
}
100% {
stroke-dasharray: 20, 80;
}
}
#keyframes donut3 {
0% {
stroke-dasharray: 0, 100;
}
100% {
stroke-dasharray: 50, 50;
}
}
.donut-label {
font-size: 0.28em;
font-weight: 700;
line-height: 1;
fill: #000;
transform: translateY(0.25em);
}
.donut-percent {
font-size: 0.5em;
line-height: 1;
transform: translateY(0.5em);
font-weight: 100;
}
.donut-data {
font-size: 0.12em;
line-height: 1;
transform: translateY(0.5em);
text-align: center;
text-anchor: middle;
color: #666;
fill: #666;
animation: donutfadelong 1s;
}
<div class="svg-item">
<svg width="100%" height="100%" viewBox="0 0 40 40" class="donut">
<circle
class="donut-hole"
cx="20"
cy="20"
r="15.91549430918954"
fill="#fff"
></circle>
<circle
class="donut-ring-ext"
cx="20"
cy="20"
r="19"
fill="transparent"
stroke-width="2"
></circle>
<circle
class="donut-segment donut-segment-2"
cx="20"
cy="20"
r="22"
fill="transparent"
stroke-width="2"
stroke-dasharray="10 90"
stroke-dashoffset="-5"
></circle>
<g class="donut-text donut-text-1">
<text y="50%" transform="translate(0, 2)">
<tspan
x="50%"
text-anchor="middle"
class="donut-percent"
>
10%
</tspan>
</text>
</g>
<span class="data-des">Amet dolorem sit</span>
</svg>
</div>
You need to animate the stroke-dashoffset attribute. At the beginning stroke-dasharay = the path's total length (calculated with .getTotalLength()). Since you are using only one value the dashes and the gaps are of equal length.
stroke-dasharray="137.35"
Also the stroke-dashoffset="137.35". This means that you don't see the dash. In this moment your stroke is the gap.
Next you are animating the stroke-dashoffset. If you want to see 10% of the dash yoi need to animate the stroke-dashoffset from 100% to 90% i.e
100% {
stroke-dashoffset: 123.6;
}
I hope it helps.
.svg-item {
flex: 1;
font-size: 16px;
max-width: 400px;
margin: 0 auto;
}
.data-des {
font-size: 0.7em;
display: block;
font-weight: bold;
text-align: center;
margin-top: 10px;
}
.donut-ring-ext {
stroke: #50b180;
}
.donut-segment {
transform-origin: center;
}
.donut-segment-2 {
stroke: #a8df8a;
animation: donut1 1s forwards;
}
.donut-segment-3 {
stroke: #a8df8a;
animation: donut2 1s;
}
.donut-segment-4 {
stroke: #a8df8a;
animation: donut3 1s;
}
.donut-percent {
color: #3c8560;
animation: donutfadelong 1s;
}
#keyframes donut1 {
100% {
stroke-dashoffset: 123.6;
}
}
.donut-label {
font-size: 0.28em;
font-weight: 700;
line-height: 1;
fill: #000;
transform: translateY(0.25em);
}
.donut-percent {
font-size: 0.5em;
line-height: 1;
transform: translateY(0.5em);
font-weight: 100;
}
.donut-data {
font-size: 0.12em;
line-height: 1;
transform: translateY(0.5em);
text-align: center;
text-anchor: middle;
color: #666;
fill: #666;
animation: donutfadelong 1s;
}
svg{border:1px solid}
<div class="svg-item">
<svg viewBox="-30 -10 100 100" class="donut">
<g transform="rotate(-90 20 20)">
<circle
class="donut-hole"
cx="20"
cy="20"
r="15.91549430918954"
fill="#f00"
></circle>
<circle
class="donut-ring-ext"
cx="20"
cy="20"
r="19"
fill="transparent"
stroke-width="2"
></circle>
<circle
class="donut-segment donut-segment-2"
cx="20"
cy="20"
r="22"
fill="transparent"
stroke-width="2"
stroke-dasharray="137.35"
stroke-dashoffset="137.35"
></circle></g>
<g class="donut-text donut-text-1">
<text y="50%" transform="translate(0, 2)">
<tspan
x="50%"
text-anchor="middle"
class="donut-percent"
>
10%
</tspan>
</text>
</g>
<span class="data-des">Amet dolorem sit</span>
</svg>
</div>

Safari does not respect #Keyframes opacity/fill

The following animation is working in the newest Chrome and FF, but Safari does not follow the defined #Keyframes. Can you help fixing this?
The issue is that Safari opacity does not follow the defined #Keyframes and "spreads out" the fill opacity during the full animation instead of respecting the #Keyframese at 0%, 30%, 90% and 100% to control the opacity. The intention is that the fill opacity should only kick in from Keyframe 90% and 100% of the animation time, not from the beginning.
Chrome - Good: https://imgur.com/zfNuV2r
Safari - Bad: https://imgur.com/AkmaAwA
path.syncron {
stroke: #2d3f50;
fill: #2d3f50;
stroke-dasharray: 266;
opacity: 10;
-moz-animation: syncron 2s cubic-bezier(0,0.23,1,0.1);
-webkit-animation: syncron 2s cubic-bezier(0,0.23,1,0.1);
animation: syncron 2s cubic-bezier(0,0.23,1,0.1);
}
path.dot {
stroke: #e64d3c;
fill: #e64d3c;
stroke-dasharray: 52;
opacity: 10;
-moz-animation: dot 2s cubic-bezier(0,0.23,1,0.1);
-webkit-animation: dot 2s cubic-bezier(0,0.23,1,0.1);
animation: dot 2s cubic-bezier(0,0.23,1,0.1);
}
/*Syncron Logo animation*/
#keyframes syncron {
0% {opacity: 0; fill: none; stroke-dasharray: 266;}
30% {opacity: 0; fill: none; stroke-dasharray: 266;}
90% {fill: rgba(45,63,80,0);}
100% {opacity: 10; fill: rgba(45,63,80,1); stroke-dasharray: 0;}
}
#-webkit-keyframes syncron {
0% {opacity: 0; fill: none; stroke-dasharray: 266;}
30% {opacity: 0; fill: none; stroke-dasharray: 266;}
90% {fill: rgba(45,63,80,0);}
100% {opacity: 1.0; fill: rgba(45,63,80,1); stroke-dasharray: 0;}
}
#-moz-keyframes syncron {
0% {opacity: 0; fill: none; stroke-dasharray: 266;}
30% {opacity: 0; fill: none; stroke-dasharray: 266;}
90% {fill: rgba(45,63,80,0);}
100% {opacity: 10; fill: rgba(45,63,80,1); stroke-dasharray: 0;}
}
#keyframes dot {
0% {opacity: 0; fill: none; stroke-dasharray: 52;}
30% {opacity: 0; fill: none; stroke-dasharray: 52;}
90% {fill: rgba(230,77,60,0);}
100% {opacity: 10; fill: rgba(230,77,60,1); stroke-dasharray: 0;}
}
#-webkit-keyframes dot {
0% {opacity: 0; fill: none; stroke-dasharray: 52;}
30% {opacity: 0; fill: none; stroke-dasharray: 52;}
90% {fill: rgba(230,77,60,0);}
100% {opacity: 10; fill: rgba(230,77,60,1); stroke-dasharray: 0;}
}
#-moz-keyframes dot {
0% {opacity: 0; fill: none; stroke-dasharray: 52;}
30% {opacity: 0; fill: none; stroke-dasharray: 52;}
90% {fill: rgba(230,77,60,0);}
100% {opacity: 10; fill: rgba(230,77,60,1); stroke-dasharray: 0;}
}
<svg version="1.1" id="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="409.11px" height="77.54" viewBox="0 0 409.11 105.75">
<style type="text/css">
.syncron{fill:none;stroke:none;stroke-miterlimit:10;}
.dot{fill:none;stroke:none;stroke-miterlimit:10;}
</style>
<title>.syncron Logo | All rights reserved (c) 2019 Syncron</title>
<a class="hide-on-fallback">
<g>
<path class="syncron" d="M52.97,69.78c7.4,0,11.11-2.37,11.11-7.1c0-1.47-0.73-2.58-2.2-3.35c-1.47-0.77-3.32-1.45-5.55-2.05
c-2.24-0.6-4.65-1.22-7.25-1.85c-2.6-0.63-5.02-1.52-7.25-2.65c-2.24-1.13-4.09-2.62-5.55-4.45c-1.47-1.83-2.2-4.08-2.2-6.75
c0-2.67,0.4-4.97,1.2-6.9c0.8-1.93,2-3.6,3.6-5c3.53-3,8.44-4.5,14.71-4.5c5,0,9.84,0.83,14.51,2.5c0.93,0.33,1.65,0.87,2.15,1.6
c0.5,0.73,0.75,1.55,0.75,2.45s-0.38,1.75-1.15,2.55c-0.77,0.8-1.52,1.2-2.25,1.2c-0.73,0-1.64-0.17-2.7-0.5
c-3.2-1-6.7-1.5-10.51-1.5s-6.69,0.67-8.65,2c-1.97,1.34-2.95,2.94-2.95,4.8c0,1.87,0.75,3.25,2.25,4.15
c1.5,0.9,3.35,1.65,5.55,2.25c2.2,0.6,4.62,1.2,7.25,1.8c2.63,0.6,5.05,1.44,7.25,2.5c5.2,2.67,7.8,6.8,7.8,12.41
c0,4.27-1.6,7.74-4.8,10.41c-3.47,2.94-8.31,4.4-14.51,4.4c-6.74,0-12.81-1.5-18.21-4.5c-1.14-0.8-1.7-1.8-1.7-3
c0-1.2,0.37-2.22,1.1-3.05c0.73-0.83,1.53-1.25,2.4-1.25c0.87,0,1.9,0.27,3.1,0.8C44.13,68.92,48.36,69.78,52.97,69.78z"/>
<path class="syncron" d="M126.51,27.01c0.87,0.9,1.3,1.84,1.3,2.8c0,0.97-0.1,1.69-0.3,2.15L100.19,97.6c-0.87,2.07-2.27,3.1-4.2,3.1
c-1.2,0-2.22-0.43-3.05-1.3c-0.83-0.87-1.25-1.74-1.25-2.6c0-0.87,0.1-1.57,0.3-2.1l6.5-16.71L79.68,32.16
c-0.27-0.67-0.4-1.47-0.4-2.4c0-0.93,0.43-1.85,1.3-2.75c0.87-0.9,1.83-1.35,2.9-1.35c2.2,0,3.7,0.93,4.5,2.8l15.41,38.22
l15.71-38.02c0.87-2,2.27-3,4.2-3C124.57,25.66,125.64,26.11,126.51,27.01z"/>
<path class="syncron" d="M163.63,33.56c-5.87,0-11.34,3.2-16.41,9.61v30.02c0,1.27-0.45,2.33-1.35,3.2c-0.9,0.87-1.99,1.3-3.25,1.3
c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V30.26c0-1.33,0.43-2.43,1.3-3.3c0.87-0.87,1.93-1.3,3.2-1.3
c1.27,0,2.35,0.43,3.25,1.3c0.9,0.87,1.35,1.97,1.35,3.3v4.1c2.67-2.8,4.97-4.77,6.9-5.9c3.8-2.2,7.42-3.3,10.86-3.3
c3.43,0,6.25,0.52,8.45,1.55c2.2,1.04,4.07,2.45,5.6,4.25c3.13,3.67,4.7,8.27,4.7,13.81v28.42c0,1.27-0.45,2.33-1.35,3.2
c-0.9,0.87-1.99,1.3-3.25,1.3c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V45.77c0-3.8-0.85-6.79-2.55-8.96
C170.38,34.65,167.56,33.56,163.63,33.56z"/>
<path class="syncron" d="M223.26,69.68c3.74,0,7.3-0.93,10.71-2.8c1.2-0.67,2.27-1,3.2-1c0.93,0,1.77,0.43,2.5,1.3
c0.73,0.87,1.1,1.9,1.1,3.1c0,1.2-0.77,2.3-2.3,3.3c-4.74,3.07-10.07,4.6-16.01,4.6c-7.4,0-13.64-2.33-18.71-7
c-5.34-4.94-8-11.44-8-19.51c0-8.07,2.67-14.57,8-19.51c5.07-4.67,11.31-7,18.71-7c4,0,7.29,0.52,9.86,1.55
c2.57,1.04,4.62,2.05,6.15,3.05c1.53,1,2.3,2.1,2.3,3.3s-0.37,2.24-1.1,3.1c-0.73,0.87-1.47,1.3-2.2,1.3c-1.14,0-2.3-0.33-3.5-1
c-3.4-1.87-6.97-2.8-10.71-2.8c-5.87,0-10.41,1.65-13.61,4.95c-3.2,3.3-4.8,7.65-4.8,13.06c0,5.4,1.6,9.76,4.8,13.06
C212.85,68.03,217.39,69.68,223.26,69.68z"/>
<path class="syncron" d="M261.78,34.56c4.67-6.27,9.91-9.41,15.71-9.41h0.5c1.27,0,2.32,0.43,3.15,1.3c0.83,0.87,1.25,1.95,1.25,3.25
s-0.43,2.34-1.3,3.1c-0.87,0.77-1.97,1.15-3.3,1.15h-0.5c-3.34,0-6.32,0.82-8.96,2.45c-2.64,1.64-4.82,3.75-6.55,6.35v30.42
c0,1.27-0.45,2.33-1.35,3.2c-0.9,0.87-1.99,1.3-3.25,1.3c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V30.26
c0-1.27,0.43-2.35,1.3-3.25c0.87-0.9,1.93-1.35,3.2-1.35c1.27,0,2.35,0.45,3.25,1.35c0.9,0.9,1.35,1.99,1.35,3.25V34.56z"/>
<path class="syncron" d="M313.91,25.16c7.74,0,13.94,2.44,18.61,7.3c4.67,4.94,7,11.34,7,19.21c0,7.87-2.34,14.28-7,19.21
c-4.67,4.87-10.87,7.3-18.61,7.3c-7.8,0-14.01-2.43-18.61-7.3c-4.67-4.87-7-11.27-7-19.21c0-7.94,2.33-14.34,7-19.21
C299.9,27.59,306.11,25.16,313.91,25.16z M302.76,65.73c1.57,1.44,3.33,2.49,5.3,3.15c1.97,0.67,3.9,1,5.8,1c1.9,0,3.83-0.33,5.8-1
c1.97-0.67,3.75-1.7,5.35-3.1c3.6-3.27,5.4-8,5.4-14.21c0-6-1.8-10.67-5.4-14.01c-3-2.73-6.7-4.1-11.11-4.1
c-7.2,0-12.21,3.24-15.01,9.71c-1,2.34-1.5,5.15-1.5,8.46c0,3.3,0.5,6.12,1.5,8.46S301.19,64.3,302.76,65.73z"/>
<path class="syncron" d="M377.75,33.56c-5.87,0-11.34,3.2-16.41,9.61v30.02c0,1.27-0.45,2.33-1.35,3.2s-1.99,1.3-3.25,1.3
c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V30.26c0-1.33,0.43-2.43,1.3-3.3c0.87-0.87,1.93-1.3,3.2-1.3
c1.27,0,2.35,0.43,3.25,1.3c0.9,0.87,1.35,1.97,1.35,3.3v4.1c2.67-2.8,4.97-4.77,6.9-5.9c3.8-2.2,7.42-3.3,10.86-3.3
s6.25,0.52,8.46,1.55c2.2,1.04,4.07,2.45,5.6,4.25c3.13,3.67,4.7,8.27,4.7,13.81v28.42c0,1.27-0.45,2.33-1.35,3.2
s-1.99,1.3-3.25,1.3c-1.27,0-2.33-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V45.77c0-3.8-0.85-6.79-2.55-8.96
C384.5,34.65,381.68,33.56,377.75,33.56z"/>
</g>
<g>
<path class="dot" d="M16.31,62.08h4c1.93,0,3.28,0.37,4.05,1.1c0.77,0.73,1.15,2.07,1.15,4v4.8c0,1.94-0.38,3.29-1.15,4.05
c-0.77,0.77-2.12,1.15-4.05,1.15h-4c-1.94,0-3.29-0.38-4.05-1.15c-0.77-0.77-1.15-2.12-1.15-4.05v-4.8c0-1.93,0.38-3.27,1.15-4
C13.02,62.45,14.37,62.08,16.31,62.08z"/>
</g>
</a>
</svg>
I found the answer. The solution was to define fill: rbga() for all the #keyframes. It seems that Chrome and Firefox were more forgiving than Safari. So I added fill: rbga() and as a bonus I also added a stroke-opacity value to counter what #Sean mentioned above when setting opacity values to single digits via rgba()
The final code that works on Chrome, Firefox, Safari and Mobile browsers are:
path.syncron {
stroke: #2d3f50;
fill: #2d3f50;
stroke-dasharray: 266;
opacity: 1;
-moz-animation: syncron 2s cubic-bezier(0,0.23,1,0.1);
-webkit-animation: syncron 2s cubic-bezier(0,0.23,1,0.1);
animation: syncron 2s cubic-bezier(0,0.23,1,0.1);
}
path.dot {
stroke: #e64d3c;
fill: #e64d3c;
stroke-dasharray: 52;
opacity: 1;
-moz-animation: dot 2s cubic-bezier(0,0.23,1,0.1);
-webkit-animation: dot 2s cubic-bezier(0,0.23,1,0.1);
animation: dot 2s cubic-bezier(0,0.23,1,0.1);
}
/*Syncron Logo animation*/
#keyframes syncron {
0% {fill: rgba(45,63,80,0); stroke-opacity: 0; stroke-dasharray: 266;}
30% {fill: rgba(45,63,80,0); stroke-opacity: 0.5; stroke-dasharray: 266;}
90% {fill: rgba(45,63,80,0); stroke-opacity: 1;}
100% {fill: rgba(45,63,80,1); stroke-opacity: 1; stroke-dasharray: 0;}
}
#-webkit-keyframes syncron {
0% {fill: rgba(45,63,80,0); stroke-opacity: 0; stroke-dasharray: 266;}
30% {fill: rgba(45,63,80,0); stroke-opacity: 0.5; stroke-dasharray: 266;}
90% {fill: rgba(45,63,80,0); stroke-opacity: 1;}
100% {fill: rgba(45,63,80,1); stroke-opacity: 1; stroke-dasharray: 0;}
}
#-moz-keyframes syncron {
0% {fill: rgba(45,63,80,0); stroke-opacity: 0; stroke-dasharray: 266;}
30% {fill: rgba(45,63,80,0); stroke-opacity: 0.5; stroke-dasharray: 266;}
90% {fill: rgba(45,63,80,0); stroke-opacity: 1;}
100% {fill: rgba(45,63,80,1); stroke-opacity: 1; stroke-dasharray: 0;}
}
#keyframes dot {
0% {fill: rgba(230,77,60,0); stroke-opacity: 0; stroke-dasharray: 52;}
30% {fill: rgba(230,77,60,0); stroke-opacity: 0.5; stroke-dasharray: 52;}
90% {fill: rgba(230,77,60,0); stroke-opacity: 1;}
100% {fill: rgba(230,77,60,1); stroke-opacity: 1; stroke-dasharray: 0;}
}
#-webkit-keyframes dot {
0% {fill: rgba(230,77,60,0); stroke-opacity: 0; stroke-dasharray: 52;}
30% {fill: rgba(230,77,60,0); stroke-opacity: 0.5; stroke-dasharray: 52;}
90% {fill: rgba(230,77,60,0); stroke-opacity: 1;}
100% {fill: rgba(230,77,60,1); stroke-opacity: 1; stroke-dasharray: 0;}
}
#-moz-keyframes dot {
0% {fill: rgba(230,77,60,0); stroke-opacity: 0; stroke-dasharray: 52;}
30% {fill: rgba(230,77,60,0); stroke-opacity: 0.5; stroke-dasharray: 52;}
90% {fill: rgba(230,77,60,0); stroke-opacity: 1;}
100% {fill: rgba(230,77,60,1); stroke-opacity: 1; stroke-dasharray: 0;}
}
<svg version="1.1" id="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="409.11px" height="77.54" viewBox="0 0 409.11 105.75">
<style type="text/css">
.syncron {
fill: none;
stroke: none;
stroke-miterlimit: 10;
}
.dot {
fill: none;
stroke: none;
stroke-miterlimit: 10;
}
</style>
<title>.syncron Logo | All rights reserved (c) 2019 Syncron</title>
<a class="hide-on-fallback">
<g>
<path class="syncron"
d="M52.97,69.78c7.4,0,11.11-2.37,11.11-7.1c0-1.47-0.73-2.58-2.2-3.35c-1.47-0.77-3.32-1.45-5.55-2.05
c-2.24-0.6-4.65-1.22-7.25-1.85c-2.6-0.63-5.02-1.52-7.25-2.65c-2.24-1.13-4.09-2.62-5.55-4.45c-1.47-1.83-2.2-4.08-2.2-6.75
c0-2.67,0.4-4.97,1.2-6.9c0.8-1.93,2-3.6,3.6-5c3.53-3,8.44-4.5,14.71-4.5c5,0,9.84,0.83,14.51,2.5c0.93,0.33,1.65,0.87,2.15,1.6
c0.5,0.73,0.75,1.55,0.75,2.45s-0.38,1.75-1.15,2.55c-0.77,0.8-1.52,1.2-2.25,1.2c-0.73,0-1.64-0.17-2.7-0.5
c-3.2-1-6.7-1.5-10.51-1.5s-6.69,0.67-8.65,2c-1.97,1.34-2.95,2.94-2.95,4.8c0,1.87,0.75,3.25,2.25,4.15
c1.5,0.9,3.35,1.65,5.55,2.25c2.2,0.6,4.62,1.2,7.25,1.8c2.63,0.6,5.05,1.44,7.25,2.5c5.2,2.67,7.8,6.8,7.8,12.41
c0,4.27-1.6,7.74-4.8,10.41c-3.47,2.94-8.31,4.4-14.51,4.4c-6.74,0-12.81-1.5-18.21-4.5c-1.14-0.8-1.7-1.8-1.7-3
c0-1.2,0.37-2.22,1.1-3.05c0.73-0.83,1.53-1.25,2.4-1.25c0.87,0,1.9,0.27,3.1,0.8C44.13,68.92,48.36,69.78,52.97,69.78z" />
<path class="syncron" d="M126.51,27.01c0.87,0.9,1.3,1.84,1.3,2.8c0,0.97-0.1,1.69-0.3,2.15L100.19,97.6c-0.87,2.07-2.27,3.1-4.2,3.1
c-1.2,0-2.22-0.43-3.05-1.3c-0.83-0.87-1.25-1.74-1.25-2.6c0-0.87,0.1-1.57,0.3-2.1l6.5-16.71L79.68,32.16
c-0.27-0.67-0.4-1.47-0.4-2.4c0-0.93,0.43-1.85,1.3-2.75c0.87-0.9,1.83-1.35,2.9-1.35c2.2,0,3.7,0.93,4.5,2.8l15.41,38.22
l15.71-38.02c0.87-2,2.27-3,4.2-3C124.57,25.66,125.64,26.11,126.51,27.01z" />
<path class="syncron" d="M163.63,33.56c-5.87,0-11.34,3.2-16.41,9.61v30.02c0,1.27-0.45,2.33-1.35,3.2c-0.9,0.87-1.99,1.3-3.25,1.3
c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V30.26c0-1.33,0.43-2.43,1.3-3.3c0.87-0.87,1.93-1.3,3.2-1.3
c1.27,0,2.35,0.43,3.25,1.3c0.9,0.87,1.35,1.97,1.35,3.3v4.1c2.67-2.8,4.97-4.77,6.9-5.9c3.8-2.2,7.42-3.3,10.86-3.3
c3.43,0,6.25,0.52,8.45,1.55c2.2,1.04,4.07,2.45,5.6,4.25c3.13,3.67,4.7,8.27,4.7,13.81v28.42c0,1.27-0.45,2.33-1.35,3.2
c-0.9,0.87-1.99,1.3-3.25,1.3c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V45.77c0-3.8-0.85-6.79-2.55-8.96
C170.38,34.65,167.56,33.56,163.63,33.56z" />
<path class="syncron" d="M223.26,69.68c3.74,0,7.3-0.93,10.71-2.8c1.2-0.67,2.27-1,3.2-1c0.93,0,1.77,0.43,2.5,1.3
c0.73,0.87,1.1,1.9,1.1,3.1c0,1.2-0.77,2.3-2.3,3.3c-4.74,3.07-10.07,4.6-16.01,4.6c-7.4,0-13.64-2.33-18.71-7
c-5.34-4.94-8-11.44-8-19.51c0-8.07,2.67-14.57,8-19.51c5.07-4.67,11.31-7,18.71-7c4,0,7.29,0.52,9.86,1.55
c2.57,1.04,4.62,2.05,6.15,3.05c1.53,1,2.3,2.1,2.3,3.3s-0.37,2.24-1.1,3.1c-0.73,0.87-1.47,1.3-2.2,1.3c-1.14,0-2.3-0.33-3.5-1
c-3.4-1.87-6.97-2.8-10.71-2.8c-5.87,0-10.41,1.65-13.61,4.95c-3.2,3.3-4.8,7.65-4.8,13.06c0,5.4,1.6,9.76,4.8,13.06
C212.85,68.03,217.39,69.68,223.26,69.68z" />
<path class="syncron"
d="M261.78,34.56c4.67-6.27,9.91-9.41,15.71-9.41h0.5c1.27,0,2.32,0.43,3.15,1.3c0.83,0.87,1.25,1.95,1.25,3.25
s-0.43,2.34-1.3,3.1c-0.87,0.77-1.97,1.15-3.3,1.15h-0.5c-3.34,0-6.32,0.82-8.96,2.45c-2.64,1.64-4.82,3.75-6.55,6.35v30.42
c0,1.27-0.45,2.33-1.35,3.2c-0.9,0.87-1.99,1.3-3.25,1.3c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V30.26
c0-1.27,0.43-2.35,1.3-3.25c0.87-0.9,1.93-1.35,3.2-1.35c1.27,0,2.35,0.45,3.25,1.35c0.9,0.9,1.35,1.99,1.35,3.25V34.56z" />
<path class="syncron" d="M313.91,25.16c7.74,0,13.94,2.44,18.61,7.3c4.67,4.94,7,11.34,7,19.21c0,7.87-2.34,14.28-7,19.21
c-4.67,4.87-10.87,7.3-18.61,7.3c-7.8,0-14.01-2.43-18.61-7.3c-4.67-4.87-7-11.27-7-19.21c0-7.94,2.33-14.34,7-19.21
C299.9,27.59,306.11,25.16,313.91,25.16z M302.76,65.73c1.57,1.44,3.33,2.49,5.3,3.15c1.97,0.67,3.9,1,5.8,1c1.9,0,3.83-0.33,5.8-1
c1.97-0.67,3.75-1.7,5.35-3.1c3.6-3.27,5.4-8,5.4-14.21c0-6-1.8-10.67-5.4-14.01c-3-2.73-6.7-4.1-11.11-4.1
c-7.2,0-12.21,3.24-15.01,9.71c-1,2.34-1.5,5.15-1.5,8.46c0,3.3,0.5,6.12,1.5,8.46S301.19,64.3,302.76,65.73z" />
<path class="syncron" d="M377.75,33.56c-5.87,0-11.34,3.2-16.41,9.61v30.02c0,1.27-0.45,2.33-1.35,3.2s-1.99,1.3-3.25,1.3
c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V30.26c0-1.33,0.43-2.43,1.3-3.3c0.87-0.87,1.93-1.3,3.2-1.3
c1.27,0,2.35,0.43,3.25,1.3c0.9,0.87,1.35,1.97,1.35,3.3v4.1c2.67-2.8,4.97-4.77,6.9-5.9c3.8-2.2,7.42-3.3,10.86-3.3
s6.25,0.52,8.46,1.55c2.2,1.04,4.07,2.45,5.6,4.25c3.13,3.67,4.7,8.27,4.7,13.81v28.42c0,1.27-0.45,2.33-1.35,3.2
s-1.99,1.3-3.25,1.3c-1.27,0-2.33-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V45.77c0-3.8-0.85-6.79-2.55-8.96
C384.5,34.65,381.68,33.56,377.75,33.56z" />
</g>
<g>
<path class="dot" d="M16.31,62.08h4c1.93,0,3.28,0.37,4.05,1.1c0.77,0.73,1.15,2.07,1.15,4v4.8c0,1.94-0.38,3.29-1.15,4.05
c-0.77,0.77-2.12,1.15-4.05,1.15h-4c-1.94,0-3.29-0.38-4.05-1.15c-0.77-0.77-1.15-2.12-1.15-4.05v-4.8c0-1.93,0.38-3.27,1.15-4
C13.02,62.45,14.37,62.08,16.31,62.08z" />
</g>
</a>
</svg>
The opacity CSS property should only be set to a value between 0 and 1. Zero is completely transparent and one is completely opaque. See the MD docs for opacity. You're setting it to 10 in several places, which is likely the cause of the unexpected behavior.
Try changing those instances of 10 to 1:
path.syncron {
stroke: #2d3f50;
fill: #2d3f50;
stroke-dasharray: 266;
opacity: 1;
-moz-animation: syncron 2s cubic-bezier(0,0.23,1,0.1);
-webkit-animation: syncron 2s cubic-bezier(0,0.23,1,0.1);
animation: syncron 2s cubic-bezier(0,0.23,1,0.1);
}
path.dot {
stroke: #e64d3c;
fill: #e64d3c;
stroke-dasharray: 52;
opacity: 1;
-moz-animation: dot 2s cubic-bezier(0,0.23,1,0.1);
-webkit-animation: dot 2s cubic-bezier(0,0.23,1,0.1);
animation: dot 2s cubic-bezier(0,0.23,1,0.1);
}
/*Syncron Logo animation*/
#keyframes syncron {
0% {opacity: 0; fill: none; stroke-dasharray: 266;}
30% {opacity: 0; fill: none; stroke-dasharray: 266;}
90% {fill: rgba(45,63,80,0);}
100% {opacity: 1; fill: rgba(45,63,80,1); stroke-dasharray: 0;}
}
#-webkit-keyframes syncron {
0% {opacity: 0; fill: none; stroke-dasharray: 266;}
30% {opacity: 0; fill: none; stroke-dasharray: 266;}
90% {fill: rgba(45,63,80,0);}
100% {opacity: 1; fill: rgba(45,63,80,1); stroke-dasharray: 0;}
}
#-moz-keyframes syncron {
0% {opacity: 0; fill: none; stroke-dasharray: 266;}
30% {opacity: 0; fill: none; stroke-dasharray: 266;}
90% {fill: rgba(45,63,80,0);}
100% {opacity: 1; fill: rgba(45,63,80,1); stroke-dasharray: 0;}
}
#keyframes dot {
0% {opacity: 0; fill: none; stroke-dasharray: 52;}
30% {opacity: 0; fill: none; stroke-dasharray: 52;}
90% {fill: rgba(230,77,60,0);}
100% {opacity: 1; fill: rgba(230,77,60,1); stroke-dasharray: 0;}
}
#-webkit-keyframes dot {
0% {opacity: 0; fill: none; stroke-dasharray: 52;}
30% {opacity: 0; fill: none; stroke-dasharray: 52;}
90% {fill: rgba(230,77,60,0);}
100% {opacity: 1; fill: rgba(230,77,60,1); stroke-dasharray: 0;}
}
#-moz-keyframes dot {
0% {opacity: 0; fill: none; stroke-dasharray: 52;}
30% {opacity: 0; fill: none; stroke-dasharray: 52;}
90% {fill: rgba(230,77,60,0);}
100% {opacity: 1; fill: rgba(230,77,60,1); stroke-dasharray: 0;}
}
<svg version="1.1" id="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="409.11px" height="77.54" viewBox="0 0 409.11 105.75">
<style type="text/css">
.syncron{fill:none;stroke:none;stroke-miterlimit:10;}
.dot{fill:none;stroke:none;stroke-miterlimit:10;}
</style>
<title>.syncron Logo | All rights reserved (c) 2019 Syncron</title>
<a class="hide-on-fallback">
<g>
<path class="syncron" d="M52.97,69.78c7.4,0,11.11-2.37,11.11-7.1c0-1.47-0.73-2.58-2.2-3.35c-1.47-0.77-3.32-1.45-5.55-2.05
c-2.24-0.6-4.65-1.22-7.25-1.85c-2.6-0.63-5.02-1.52-7.25-2.65c-2.24-1.13-4.09-2.62-5.55-4.45c-1.47-1.83-2.2-4.08-2.2-6.75
c0-2.67,0.4-4.97,1.2-6.9c0.8-1.93,2-3.6,3.6-5c3.53-3,8.44-4.5,14.71-4.5c5,0,9.84,0.83,14.51,2.5c0.93,0.33,1.65,0.87,2.15,1.6
c0.5,0.73,0.75,1.55,0.75,2.45s-0.38,1.75-1.15,2.55c-0.77,0.8-1.52,1.2-2.25,1.2c-0.73,0-1.64-0.17-2.7-0.5
c-3.2-1-6.7-1.5-10.51-1.5s-6.69,0.67-8.65,2c-1.97,1.34-2.95,2.94-2.95,4.8c0,1.87,0.75,3.25,2.25,4.15
c1.5,0.9,3.35,1.65,5.55,2.25c2.2,0.6,4.62,1.2,7.25,1.8c2.63,0.6,5.05,1.44,7.25,2.5c5.2,2.67,7.8,6.8,7.8,12.41
c0,4.27-1.6,7.74-4.8,10.41c-3.47,2.94-8.31,4.4-14.51,4.4c-6.74,0-12.81-1.5-18.21-4.5c-1.14-0.8-1.7-1.8-1.7-3
c0-1.2,0.37-2.22,1.1-3.05c0.73-0.83,1.53-1.25,2.4-1.25c0.87,0,1.9,0.27,3.1,0.8C44.13,68.92,48.36,69.78,52.97,69.78z"/>
<path class="syncron" d="M126.51,27.01c0.87,0.9,1.3,1.84,1.3,2.8c0,0.97-0.1,1.69-0.3,2.15L100.19,97.6c-0.87,2.07-2.27,3.1-4.2,3.1
c-1.2,0-2.22-0.43-3.05-1.3c-0.83-0.87-1.25-1.74-1.25-2.6c0-0.87,0.1-1.57,0.3-2.1l6.5-16.71L79.68,32.16
c-0.27-0.67-0.4-1.47-0.4-2.4c0-0.93,0.43-1.85,1.3-2.75c0.87-0.9,1.83-1.35,2.9-1.35c2.2,0,3.7,0.93,4.5,2.8l15.41,38.22
l15.71-38.02c0.87-2,2.27-3,4.2-3C124.57,25.66,125.64,26.11,126.51,27.01z"/>
<path class="syncron" d="M163.63,33.56c-5.87,0-11.34,3.2-16.41,9.61v30.02c0,1.27-0.45,2.33-1.35,3.2c-0.9,0.87-1.99,1.3-3.25,1.3
c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V30.26c0-1.33,0.43-2.43,1.3-3.3c0.87-0.87,1.93-1.3,3.2-1.3
c1.27,0,2.35,0.43,3.25,1.3c0.9,0.87,1.35,1.97,1.35,3.3v4.1c2.67-2.8,4.97-4.77,6.9-5.9c3.8-2.2,7.42-3.3,10.86-3.3
c3.43,0,6.25,0.52,8.45,1.55c2.2,1.04,4.07,2.45,5.6,4.25c3.13,3.67,4.7,8.27,4.7,13.81v28.42c0,1.27-0.45,2.33-1.35,3.2
c-0.9,0.87-1.99,1.3-3.25,1.3c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V45.77c0-3.8-0.85-6.79-2.55-8.96
C170.38,34.65,167.56,33.56,163.63,33.56z"/>
<path class="syncron" d="M223.26,69.68c3.74,0,7.3-0.93,10.71-2.8c1.2-0.67,2.27-1,3.2-1c0.93,0,1.77,0.43,2.5,1.3
c0.73,0.87,1.1,1.9,1.1,3.1c0,1.2-0.77,2.3-2.3,3.3c-4.74,3.07-10.07,4.6-16.01,4.6c-7.4,0-13.64-2.33-18.71-7
c-5.34-4.94-8-11.44-8-19.51c0-8.07,2.67-14.57,8-19.51c5.07-4.67,11.31-7,18.71-7c4,0,7.29,0.52,9.86,1.55
c2.57,1.04,4.62,2.05,6.15,3.05c1.53,1,2.3,2.1,2.3,3.3s-0.37,2.24-1.1,3.1c-0.73,0.87-1.47,1.3-2.2,1.3c-1.14,0-2.3-0.33-3.5-1
c-3.4-1.87-6.97-2.8-10.71-2.8c-5.87,0-10.41,1.65-13.61,4.95c-3.2,3.3-4.8,7.65-4.8,13.06c0,5.4,1.6,9.76,4.8,13.06
C212.85,68.03,217.39,69.68,223.26,69.68z"/>
<path class="syncron" d="M261.78,34.56c4.67-6.27,9.91-9.41,15.71-9.41h0.5c1.27,0,2.32,0.43,3.15,1.3c0.83,0.87,1.25,1.95,1.25,3.25
s-0.43,2.34-1.3,3.1c-0.87,0.77-1.97,1.15-3.3,1.15h-0.5c-3.34,0-6.32,0.82-8.96,2.45c-2.64,1.64-4.82,3.75-6.55,6.35v30.42
c0,1.27-0.45,2.33-1.35,3.2c-0.9,0.87-1.99,1.3-3.25,1.3c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V30.26
c0-1.27,0.43-2.35,1.3-3.25c0.87-0.9,1.93-1.35,3.2-1.35c1.27,0,2.35,0.45,3.25,1.35c0.9,0.9,1.35,1.99,1.35,3.25V34.56z"/>
<path class="syncron" d="M313.91,25.16c7.74,0,13.94,2.44,18.61,7.3c4.67,4.94,7,11.34,7,19.21c0,7.87-2.34,14.28-7,19.21
c-4.67,4.87-10.87,7.3-18.61,7.3c-7.8,0-14.01-2.43-18.61-7.3c-4.67-4.87-7-11.27-7-19.21c0-7.94,2.33-14.34,7-19.21
C299.9,27.59,306.11,25.16,313.91,25.16z M302.76,65.73c1.57,1.44,3.33,2.49,5.3,3.15c1.97,0.67,3.9,1,5.8,1c1.9,0,3.83-0.33,5.8-1
c1.97-0.67,3.75-1.7,5.35-3.1c3.6-3.27,5.4-8,5.4-14.21c0-6-1.8-10.67-5.4-14.01c-3-2.73-6.7-4.1-11.11-4.1
c-7.2,0-12.21,3.24-15.01,9.71c-1,2.34-1.5,5.15-1.5,8.46c0,3.3,0.5,6.12,1.5,8.46S301.19,64.3,302.76,65.73z"/>
<path class="syncron" d="M377.75,33.56c-5.87,0-11.34,3.2-16.41,9.61v30.02c0,1.27-0.45,2.33-1.35,3.2s-1.99,1.3-3.25,1.3
c-1.27,0-2.34-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V30.26c0-1.33,0.43-2.43,1.3-3.3c0.87-0.87,1.93-1.3,3.2-1.3
c1.27,0,2.35,0.43,3.25,1.3c0.9,0.87,1.35,1.97,1.35,3.3v4.1c2.67-2.8,4.97-4.77,6.9-5.9c3.8-2.2,7.42-3.3,10.86-3.3
s6.25,0.52,8.46,1.55c2.2,1.04,4.07,2.45,5.6,4.25c3.13,3.67,4.7,8.27,4.7,13.81v28.42c0,1.27-0.45,2.33-1.35,3.2
s-1.99,1.3-3.25,1.3c-1.27,0-2.33-0.43-3.2-1.3c-0.87-0.87-1.3-1.93-1.3-3.2V45.77c0-3.8-0.85-6.79-2.55-8.96
C384.5,34.65,381.68,33.56,377.75,33.56z"/>
</g>
<g>
<path class="dot" d="M16.31,62.08h4c1.93,0,3.28,0.37,4.05,1.1c0.77,0.73,1.15,2.07,1.15,4v4.8c0,1.94-0.38,3.29-1.15,4.05
c-0.77,0.77-2.12,1.15-4.05,1.15h-4c-1.94,0-3.29-0.38-4.05-1.15c-0.77-0.77-1.15-2.12-1.15-4.05v-4.8c0-1.93,0.38-3.27,1.15-4
C13.02,62.45,14.37,62.08,16.31,62.08z"/>
</g>
</a>
</svg>

Changing values of the points attribute on hover - SVG - polyline

So I have this svg element, which is basically a cube:
#rect1 {fill: url(#Gradient1)}
.stop1 {stop-color: black}
.stop2 {stop-color: #5961FF}
#cube {
transform-origin: 50% 30%;
transform: scale(0.5);
transform: translate(-220px, 0);
}
#cube-text {
font-size: 2.5em;
fill: red;
transform: rotate(-30,300, 10);
font-family: 'VT323', monospace;
text-shadow:
-2px 4px 2px rgba(254,254,254,0.5),
-4px 4px 3px rgba(255,255,255,0.4),
-6px 4px 2px rgba(22,44,65,0.62),
-8px 4px 1px rgba(22,44,65,1);
opacity: 1;
}
#top {
transform: translate(0, -300px);
animation: top 0.5s forwards ease-out 1s;
opacity: 0;
fill: url(#blue);
z-index: 99;
}
#right {
transform: translate(300px, 0);
animation: right 0.5s forwards ease-out 2s;
opacity: 0;
fill: #152B40;
z-index: 99;
}
#left {
transform: translate(-300px, 0);
animation: left 0.5s forwards ease-out 3s;
opacity: 0;
fill: url(#blue-shade);
z-index: 99;
}
#left:hover {
points: "500, 100";
}
#keyframes top {
from {
transform: translate(0, -300px);
opacity: 0;
}
to {
transform: translate(0, 0);
opacity: 1;
}
}
#keyframes right {
from {
transform: translate(300px, 0);
opacity: 0;
}
to {
transform: translate(0, 0);
opacity: 1;
}
}
#keyframes left {
from {
transform: translate(-300px, 0);
opacity: 0;
}
to {
transform: translate(0, 0);
opacity: 1;
}
}
#keyframes rotate {
from {
transform: rotate(0);
opacity: 0;
}
to {
transform: rotate(360deg);
opacity: 1;
}
}
#keyframes scale-spin {
from {
transform: scale(1);
}
to {
transform: scale(0);
}
}
<link href="https://fonts.googleapis.com/css?family=Baloo+Tamma|Black+Ops+One|Coda|Codystar|Fugaz+One|IBM+Plex+Mono|Overpass+Mono|PT+Mono|Racing+Sans+One|VT323" rel="stylesheet">
<svg id="cube" height="1000" width="1000">
<defs>
<linearGradient id="blue" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#152B40"/>
<stop offset="50%" stop-color="#152B40"/>
</linearGradient>
<linearGradient id="blue-shade" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#152B40"/>
<stop offset="100%" stop-color="#4A9BE5"/>
</linearGradient>
</defs>
<text id="cube-text" x="250" y="560">
<tspan x="414" y="320">Random Text</tspan>
</text>
<polyline id="top" points="500,100 250,150 500,220 750,150 500,100" style="fill: #152B40; stroke: ; stroke-width: "/>
<polyline id="right" points="500,220 500,550 750,400 750,150 500,220" style="fill: #152B40; stroke: #152B40; stroke-width: " />
<polyline id="left" points="500,550 250,400 250,150 500,220" style="fill: ; stroke: #152B40; stroke-width: 2" />
</svg>
When I :hover over the #left polyline, I want to change the values of the points attribute. For some reason I cannot edit that with CSS and therefore think points isn't a valid CSS property.
Unfortunately there is no CSS property that can effect the points attribute of the polyline element.
Instead, you can do it with the onmouseover event and setAttribute() method, e.g.:
function changeLeft() {
var left = document.getElementById('left');
left.setAttribute('points','510,560 260,410 260,160 510,230');
}
#rect1 {fill: url(#Gradient1)}
.stop1 {stop-color: black}
.stop2 {stop-color: #5961FF}
#cube {
transform-origin: 50% 30%;
transform: scale(0.5);
transform: translate(-220px, 0);
}
#cube-text {
font-size: 2.5em;
fill: red;
transform: rotate(-30, 300, 10);
font-family: 'VT323', monospace;
text-shadow:
-2px 4px 2px rgba(254,254,254,0.5),
-4px 4px 3px rgba(255,255,255,0.4),
-6px 4px 2px rgba(22,44,65,0.62),
-8px 4px 1px rgba(22,44,65,1);
opacity: 1;
}
#top {
transform: translate(0, -300px);
animation: top 0.5s forwards ease-out 1s;
opacity: 0;
fill: url(#blue);
z-index: 99;
}
#right {
transform: translate(300px, 0);
animation: right 0.5s forwards ease-out 2s;
opacity: 0;
fill: #152B40;
z-index: 99;
}
#left {
transform: translate(-300px, 0);
animation: left 0.5s forwards ease-out 3s;
opacity: 0;
fill: url(#blue-shade);
z-index: 99;
}
/*
#left:hover {
points: "500, 100";
}
*/
#keyframes top {
from {
transform: translate(0, -300px);
opacity: 0;
}
to {
transform: translate(0, 0);
opacity: 1;
}
}
#keyframes right {
from {
transform: translate(300px, 0);
opacity: 0;
}
to {
transform: translate(0, 0);
opacity: 1;
}
}
#keyframes left {
from {
transform: translate(-300px, 0);
opacity: 0;
}
to {
transform: translate(0, 0);
opacity: 1;
}
}
#keyframes rotate {
from {
transform: rotate(0);
opacity: 0;
}
to {
transform: rotate(360deg);
opacity: 1;
}
}
#keyframes scale-spin {
from {
transform: scale(1);
}
to {
transform: scale(0);
}
}
<link href="https://fonts.googleapis.com/css?family=Baloo+Tamma|Black+Ops+One|Coda|Codystar|Fugaz+One|IBM+Plex+Mono|Overpass+Mono|PT+Mono|Racing+Sans+One|VT323" rel="stylesheet">
<svg id="cube" height="1000" width="1000">
<defs>
<linearGradient id="blue" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#152B40"/>
<stop offset="50%" stop-color="#152B40"/>
</linearGradient>
<linearGradient id="blue-shade" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#152B40"/>
<stop offset="100%" stop-color="#4A9BE5"/>
</linearGradient>
</defs>
<text id="cube-text" x="250" y="560">
<tspan x="414" y="320">Random Text</tspan>
</text>
<polyline id="top" points="500,100 250,150 500,220 750,150 500,100" style="fill: #152B40; stroke: ; stroke-width: " />
<polyline id="right" points="500,220 500,550 750,400 750,150 500,220" style="fill: #152B40; stroke: #152B40; stroke-width: " />
<polyline id="left" points="500,550 250,400 250,150 500,220" style="fill: ; stroke: #152B40; stroke-width: 2" onmouseover="changeLeft();" />
</svg>

Increasing a material loader's size

I have a material loader, and I'm having difficulties figuring out how to enlarge the animation.
HTML & CSS:
.loading-directive {
position:relative;
clear:both;
top: 37px
}
.loading-directive .loader {
position:relative;
margin:0 auto;
width:65px;
height:64px;
zoom:1;
}
.loading-directive .circular {
-webkit-animation:loadingrotate 2s linear infinite;animation:loadingrotate 2s linear infinite;height:64px;position:relative;width:65px
}
.loading-directive .path {
stroke-dasharray:1,200;
stroke-dashoffset:0;
-webkit-animation:loadingdash 1.5s ease-in-out infinite;animation:loadingdash 1.5s ease-in-out infinite;
stroke-linecap:round;
stroke:#333333;
}
#-webkit-keyframes loadingrotate{
100%{
-webkit-transform:rotate(360deg);transform:rotate(360deg)
}
}
#keyframes loadingrotate{
100%{
-webkit-transform:rotate(360deg);transform:rotate(360deg)
}
}
#-webkit-keyframes loadingdash{
0%{
stroke-dasharray:1,200;stroke-dashoffset:0
}
50%{
stroke-dasharray:150,200;stroke-dashoffset:-50
}
100%{
stroke-dasharray:150,200;stroke-dashoffset:-185
}
}
#keyframes loadingdash{
0%{
stroke-dasharray:1,200;stroke-dashoffset:0
}
50%{
stroke-dasharray:150,200;stroke-dashoffset:-50
}
100%{
stroke-dasharray:150,200;stroke-dashoffset:-185
}
}
<div class="loading-directive" id="product-image-container" style="display: block;">
<div class="loader">
<svg class="circular">
<circle class="path" cx="32" cy="32" r="30" fill="none" stroke-width="4">
</circle>
</svg>
</div>
</div>
Loader in question:
https://jsfiddle.net/012k581h/
I need the loader to be 25% larger than displayed here. What properties must be adjusted to achieve this?
You can use the the scale property using css
.loading-directive .loader {
position: relative;
margin: 0 auto;
width: 65px;
height: 64px;
zoom: 1;
transform: scale(1.5, 1.5);
-webkit-transform: scale(1.5, 1.5);
-moz-transform: scale(1.5, 1.5);
-ms-transform: scale(1.5, 1.5);
-o-transform: scale(1.5, 1.5);
}
See snippet below
.loading-directive {
position: relative;
clear: both;
top: 37px
}
.loading-directive .loader {
position: relative;
margin: 0 auto;
width: 65px;
height: 64px;
zoom: 1;
transform: scale(1.5, 1.5);
-webkit-transform: scale(1.5, 1.5);
-moz-transform: scale(1.5, 1.5);
-ms-transform: scale(1.5, 1.5);
-o-transform: scale(1.5, 1.5);
}
.loading-directive .circular {
-webkit-animation: loadingrotate 2s linear infinite;
animation: loadingrotate 2s linear infinite;
height: 64px;
position: relative;
width: 65px
}
.loading-directive .path {
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
-webkit-animation: loadingdash 1.5s ease-in-out infinite;
animation: loadingdash 1.5s ease-in-out infinite;
stroke-linecap: round;
stroke: #333333;
}
#-webkit-keyframes loadingrotate {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg)
}
}
#keyframes loadingrotate {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg)
}
}
#-webkit-keyframes loadingdash {
0% {
stroke-dasharray: 1, 200;
stroke-dashoffset: 0
}
50% {
stroke-dasharray: 150, 200;
stroke-dashoffset: -50
}
100% {
stroke-dasharray: 150, 200;
stroke-dashoffset: -185
}
}
#keyframes loadingdash {
0% {
stroke-dasharray: 1, 200;
stroke-dashoffset: 0
}
50% {
stroke-dasharray: 150, 200;
stroke-dashoffset: -50
}
100% {
stroke-dasharray: 150, 200;
stroke-dashoffset: -185
}
}
<div class="loading-directive" id="product-image-container" style="display: block;">
<div class="loader">
<svg class="circular">
<circle class="path" cx="32" cy="32" r="30" fill="none" stroke-width="4">
</circle>
</svg>
</div>
</div>

Resources