How to rotate an inline svg? - css

https://jsfiddle.net/L1u83Lts/1/ <-- That is my inline svg code, it has some css inside already so when you hover over the parent div, #menu_btn, the path changes color, I would like to know if it would be possible to use css transform: rotate() with this svg? I've tried a few methods but I know I'm missing something.
Code here as well vvv
<svg id="menu_svg" enable-background="new 0 0 512 512" height="75px" id="Layer_1" version="1.1" viewBox="0 0 512 512" width="80px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
#menu_svg {
width: 100%;
height: 100%;
}
.menu_svg {
fill: white;
}
#menu_btn:hover + #menu_svg .menu_svg {
fill: #FC0;
}
</style>
<defs>
<g id="menu_svg_cont">
<path d="M197.396,249.5c1.664,0,3.327,0.635,4.596,1.904L319.2,368.612c2.539,2.539,2.539,6.654,0,9.192 c-2.538,2.538-6.654,2.538-9.192,0L192.8,260.596c-2.539-2.539-2.539-6.654,0-9.192C194.069,250.135,195.732,249.5,197.396,249.5z " />
<path d="M314.604,132.292c1.664,0,3.327,0.634,4.596,1.904c2.539,2.539,2.539,6.654,0,9.192L201.992,260.596 c-2.538,2.539-6.653,2.539-9.192,0c-2.539-2.539-2.539-6.654,0-9.192l117.208-117.208 C311.277,132.927,312.941,132.292,314.604,132.292z"/>
</g>
</defs>
<g class="menu_svg">
<use xlink:href="#menu_svg_cont"/>
</g>
</svg>

You mean like this?
document.getElementById("menu_btn").addEventListener("click", function(evt) {
document.getElementById("part1").beginElement();
});
<button type="button" id="menu_btn">Begin</button>
<svg id="menu_svg" enable-background="new 0 0 512 512" height="75px" id="Layer_1" version="1.1" viewBox="0 0 512 512" width="80px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
#menu_svg {
width: 100%;
height: 100%;
}
.menu_svg {
fill: red;
}
#menu_btn:hover + #menu_svg .menu_svg {
fill: #FC0;
}
</style>
<defs>
<g id="menu_svg_cont">
<path d="M197.396,249.5c1.664,0,3.327,0.635,4.596,1.904L319.2,368.612c2.539,2.539,2.539,6.654,0,9.192 c-2.538,2.538-6.654,2.538-9.192,0L192.8,260.596c-2.539-2.539-2.539-6.654,0-9.192C194.069,250.135,195.732,249.5,197.396,249.5z " />
<path d="M314.604,132.292c1.664,0,3.327,0.634,4.596,1.904c2.539,2.539,2.539,6.654,0,9.192L201.992,260.596 c-2.538,2.539-6.653,2.539-9.192,0c-2.539-2.539-2.539-6.654,0-9.192l117.208-117.208 C311.277,132.927,312.941,132.292,314.604,132.292z"/>
</g>
</defs>
<g class="menu_svg">
<use xlink:href="#menu_svg_cont">
<animateTransform attributeType="XML" attributeName="transform" id="part1"
type="rotate" from="0 256 256" to="90 256 256"
dur="0.5s" begin="indefinite" fill="freeze"/>
<animateTransform attributeType="XML" attributeName="transform"
type="rotate" from="90 256 256" to="0 256 256"
dur="0.5s" begin="part1.end" fill="freeze" />
</use>
</g>
</svg>

Related

How to clipping image in svg

how can i add the image overlay in the black background in the svg (lines must overlay)? in the example you can see that iam almost done
Correct svg:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="6 8 101 98">
<g id="Grafisch-element---zwart---smart" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M61.5,104 C86.6289561,104 107,83.6851049 107,58.6254118 C107,33.5657187 78.0465356,8 52.9175795,8 C27.7886234,8 16,33.5657187 16,58.6254118 C16,83.6851049 36.3710439,104 61.5,104 Z" id="Oval-Copy-10" fill="#000000"/>
<path d="M51.5,15.9 C39.1834288,15.9 28.0326258,20.8619717 19.9611234,28.8851355 C11.8915835,36.9063486 6.90000004,47.9874214 6.90000004,60.2275098 C6.90000004,73.9162468 7.92111543,86.3511139 13.1337943,94.6817587 C17.2084084,101.193605 23.8906017,105.1 34.6409154,105.1 C47.971902,105.1 64.7440729,99.1623584 77.4205397,89.8576443 C88.2218731,81.9293058 96.1,71.540767 96.1,60.2275098 C96.1,47.9874214 91.1084165,36.9063486 83.0388766,28.8851355 C74.9673742,20.8619717 63.8165712,15.9 51.5,15.9 Z" id="Oval-Copy-11" stroke="#E1E1E1" stroke-width="1.80000007"/>
</g>
</svg>
My code:
.svg {
position: absolute;
width: 0;
height: 0;
}
.clipped {
width: 100%;
height: 350px;
background: turquoise url(https://source.unsplash.com/600x600?summer);
background-size: cover;
-webkit-clip-path: url(#my-clip-path);
clip-path: url(#my-clip-path);
}
<svg class="svg">
<clipPath id="my-clip-path" clipPathUnits="objectBoundingBox"><path d="M0.676,1 C0.952,1,1,0.872,1,0.611 C1,0.35,0.858,0.083,0.582,0.083 C0.305,0.083,0.176,0.35,0.176,0.611 C0.176,0.872,0.4,1,0.676,1"></path></clipPath>
<path d="M51.5,15.9 C39.1834288,15.9 28.0326258,20.8619717 19.9611234,28.8851355 C11.8915835,36.9063486 6.90000004,47.9874214 6.90000004,60.2275098 C6.90000004,73.9162468 7.92111543,86.3511139 13.1337943,94.6817587 C17.2084084,101.193605 23.8906017,105.1 34.6409154,105.1 C47.971902,105.1 64.7440729,99.1623584 77.4205397,89.8576443 C88.2218731,81.9293058 96.1,71.540767 96.1,60.2275098 C96.1,47.9874214 91.1084165,36.9063486 83.0388766,28.8851355 C74.9673742,20.8619717 63.8165712,15.9 51.5,15.9 Z" id="Oval-Copy-11" stroke="#E1E1E1" stroke-width="1.80000007"/>
</svg>
<div class="clipped"></div>
https://jsfiddle.net/yfLbka6x/
Try like this:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="6 8 101 98">
<defs>
<path d="M61.5,104 C86.6289561,104 107,83.6851049 107,58.6254118 C107,33.5657187 78.0465356,8 52.9175795,8 C27.7886234,8 16,33.5657187 16,58.6254118 C16,83.6851049 36.3710439,104 61.5,104 Z" id="Oval-Copy-10" fill="#000000" />
</defs>
<clipPath id="my-clip-path">
<use href="#Oval-Copy-10" />
</clipPath>
<g id="Grafisch-element---zwart---smart" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<image width="108" height="108" href="https://source.unsplash.com/600x600?summer" clip-path="url(#my-clip-path)" />
<path d="M51.5,15.9 C39.1834288,15.9 28.0326258,20.8619717 19.9611234,28.8851355 C11.8915835,36.9063486 6.90000004,47.9874214 6.90000004,60.2275098 C6.90000004,73.9162468 7.92111543,86.3511139 13.1337943,94.6817587 C17.2084084,101.193605 23.8906017,105.1 34.6409154,105.1 C47.971902,105.1 64.7440729,99.1623584 77.4205397,89.8576443 C88.2218731,81.9293058 96.1,71.540767 96.1,60.2275098 C96.1,47.9874214 91.1084165,36.9063486 83.0388766,28.8851355 C74.9673742,20.8619717 63.8165712,15.9 51.5,15.9 Z" id="Oval-Copy-11" stroke="#E1E1E1" stroke-width="1.80000007" />
</g>
</svg>

Before pseudo element not showing up on path element

Hi i am trying to create a 'pin' on a SVG map of the whole world, the SVG is build with path elements, my thought was to use a before or after element and show the pin accordingly.
Apparently it is not showing on the path element, i can see it in the debugger/console and if i put it on a div element it works fine and shows up, i have cut out all countries except the first one in the SVG for simplicity.
CSS
.map-pin::after{
content: url('pin.svg');
background-size: 30px 30px;
background-repeat: no-repeat;
background-position: left top;
width: 30px;
height: 30px;
z-index: 10;
font-size: 1px;
display: inline-block;
position: absolute;
left: -999px;
top: -999px;
/*display: none;*/
}
.map-pin.active::after{
display: block;
}
.map-pin.active[data-id="AF"]::after{
top: 0;
left: 0;
}
SVG
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" style="stroke-linejoin: round; stroke:#000; fill: none;" viewBox="0 0 2000 1001" id="svg2" inkscape:version="0.48.4 r9939" sodipodi:docname="world.svg">
<defs id="defs4">
<style type="text/css" id="style6">path { fill-rule: evenodd; }</style>
</defs>
<g id="countries">
<path id="AF" data-name="Afghanistan" data-id="AF" class="map-pin active" d="m 1369.9,333.8 -5.4,0 -3.8,-0.5 -2.5,2.9 -2.1,0.7 -1.5,1.3 -2.6,-2.1 -1,-5.4 -1.6,-0.3 0,-2 -3.2,-1.5 -1.7,2.3 0.2,2.6 -0.6,0.9 -3.2,-0.1 -0.9,3 -2.1,-1.3 -3.3,2.1 -1.8,-0.8 -4.3,-1.4 -2.9,0 -1.6,-0.2 -2.9,-1.7 -0.3,2.3 -4.1,1.2 0.1,5.2 -2.5,2 -4,0.9 -0.4,3 -3.9,0.8 -5.9,-2.4 -0.5,8 -0.5,4.7 2.5,0.9 -1.6,3.5 2.7,5.1 1.1,4 4.3,1.1 1.1,4 -3.9,5.8 9.6,3.2 5.3,-0.9 3.3,0.8 0.9,-1.4 3.8,0.5 6.6,-2.6 -0.8,-5.4 2.3,-3.6 4,0 0.2,-1.7 4,-0.9 2.1,0.6 1.7,-1.8 -1.1,-3.8 1.5,-3.8 3,-1.6 -3,-4.2 5.1,0.2 0.9,-2.3 -0.8,-2.5 2,-2.7 -1.4,-3.2 -1.9,-2.8 2.4,-2.8 5.3,-1.3 5.8,-0.8 2.4,-1.2 2.8,-0.7 -1.4,-1.9 z" style="fill:#f2f2f2;fill-rule:evenodd"></path>
</g>
</svg>
I also tried a more simple way by just adding an element inside the SVG after all the path elements, but this breaks the whole SVG.
Anyone able to help me out here, is it not possible in SVG path elements? and if so, what other options am i left with?
PIN:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Layer_1" style="enable-background:new 0 0 512 512;" viewBox="0 0 512 512" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#454545;stroke-width:18;stroke-miterlimit:10;}
</style>
<g>
<g id="XMLID_4245_">
<path class="st0" d="M389.3,208.7c0-73.6-59.7-133.3-133.3-133.3c-73.6,0-133.3,59.7-133.3,133.3 c0,32.6,12.1,62,31.5,85.1l55.3,75.4l46.6,67.5l101.8-142.9C377.2,270.7,389.3,241.2,389.3,208.7z" id="XMLID_4247_"></path>
<path class="st0" d="M311,170.9L311,170.9c-12.1-11.6-31.7-11.6-43.8,0l-10.9,10.5L245.3,171 c-12.1-11.6-31.7-11.6-43.8,0c-12.1,11.6-12.1,30.4,0,42l54.7,52.5L311,213C323.1,201.4,323.1,182.6,311,170.9z" id="XMLID_4246_"></path>
</g>
</g>
</svg>
As I've commented you can't have a before pseudo element for a path. However in your case you can have a symbol for the pin and use it at the end of your document. This way it will stay above all the other paths. (a z-index won't work either in SVG).
If you are using a symbol with a viewBox attribute you can give the <use> element a position (x and y attributes) and a size (width and height attributes)
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" style="stroke-linejoin: round; stroke:#000; fill: none;" viewBox="1280 320 100 100" id="svg2" >
<defs id="defs4">
<style type="text/css" id="style6">path { fill-rule: evenodd; }</style>
</defs>
<symbol id="map-pin-after" viewBox="0 0 30 30">
<circle cx="15" cy="8" r="8" /> <polygon points="15,30 22.7,10 7.3,10 15,30"/>
</symbol>
<g id="countries">
<path id="AF" data-name="Afghanistan" data-id="AF" class="map-pin active" d="m 1369.9,333.8 -5.4,0 -3.8,-0.5 -2.5,2.9 -2.1,0.7 -1.5,1.3 -2.6,-2.1 -1,-5.4 -1.6,-0.3 0,-2 -3.2,-1.5 -1.7,2.3 0.2,2.6 -0.6,0.9 -3.2,-0.1 -0.9,3 -2.1,-1.3 -3.3,2.1 -1.8,-0.8 -4.3,-1.4 -2.9,0 -1.6,-0.2 -2.9,-1.7 -0.3,2.3 -4.1,1.2 0.1,5.2 -2.5,2 -4,0.9 -0.4,3 -3.9,0.8 -5.9,-2.4 -0.5,8 -0.5,4.7 2.5,0.9 -1.6,3.5 2.7,5.1 1.1,4 4.3,1.1 1.1,4 -3.9,5.8 9.6,3.2 5.3,-0.9 3.3,0.8 0.9,-1.4 3.8,0.5 6.6,-2.6 -0.8,-5.4 2.3,-3.6 4,0 0.2,-1.7 4,-0.9 2.1,0.6 1.7,-1.8 -1.1,-3.8 1.5,-3.8 3,-1.6 -3,-4.2 5.1,0.2 0.9,-2.3 -0.8,-2.5 2,-2.7 -1.4,-3.2 -1.9,-2.8 2.4,-2.8 5.3,-1.3 5.8,-0.8 2.4,-1.2 2.8,-0.7 -1.4,-1.9 z" fill="#f2f2f2"></path>
</g>
<use xlink:href="#map-pin-after" stroke="none" fill="red" width="30" height="30" x="1310" y="327"/>
</svg>
UPDATE
An update where I'm using the OP's pin:
Since the new pin is not a square, and in order to preserve the aspect ratio, I had to recalculate the height of the pin.
<svg viewBox="1280 320 100 100" >
<defs>
<symbol id="map-pin-after" viewBox="111 60 290 397">
<g id="XMLID_4245_" fill="none" stroke="#454545" stroke-width="18" stroke-mitterlimit="10">
<path d="M389.3,208.7c0-73.6-59.7-133.3-133.3-133.3c-73.6,0-133.3,59.7-133.3,133.3 c0,32.6,12.1,62,31.5,85.1l55.3,75.4l46.6,67.5l101.8-142.9C377.2,270.7,389.3,241.2,389.3,208.7z" ></path>
<path d="M311,170.9L311,170.9c-12.1-11.6-31.7-11.6-43.8,0l-10.9,10.5L245.3,171 c-12.1-11.6-31.7-11.6-43.8,0c-12.1,11.6-12.1,30.4,0,42l54.7,52.5L311,213C323.1,201.4,323.1,182.6,311,170.9z" ></path>
</g>
</symbol>
</defs>
<g id="countries">
<path id="AF" data-name="Afghanistan" data-id="AF" class="map-pin active" d="m 1369.9,333.8 -5.4,0 -3.8,-0.5 -2.5,2.9 -2.1,0.7 -1.5,1.3 -2.6,-2.1 -1,-5.4 -1.6,-0.3 0,-2 -3.2,-1.5 -1.7,2.3 0.2,2.6 -0.6,0.9 -3.2,-0.1 -0.9,3 -2.1,-1.3 -3.3,2.1 -1.8,-0.8 -4.3,-1.4 -2.9,0 -1.6,-0.2 -2.9,-1.7 -0.3,2.3 -4.1,1.2 0.1,5.2 -2.5,2 -4,0.9 -0.4,3 -3.9,0.8 -5.9,-2.4 -0.5,8 -0.5,4.7 2.5,0.9 -1.6,3.5 2.7,5.1 1.1,4 4.3,1.1 1.1,4 -3.9,5.8 9.6,3.2 5.3,-0.9 3.3,0.8 0.9,-1.4 3.8,0.5 6.6,-2.6 -0.8,-5.4 2.3,-3.6 4,0 0.2,-1.7 4,-0.9 2.1,0.6 1.7,-1.8 -1.1,-3.8 1.5,-3.8 3,-1.6 -3,-4.2 5.1,0.2 0.9,-2.3 -0.8,-2.5 2,-2.7 -1.4,-3.2 -1.9,-2.8 2.4,-2.8 5.3,-1.3 5.8,-0.8 2.4,-1.2 2.8,-0.7 -1.4,-1.9 z" fill="#f2f2f2" stroke="black"></path>
</g>
<use xlink:href="#map-pin-after" stroke="none" fill="red" width="41" height="30" x="1305" y="327"/>
</svg>

my svg circle is not rotating proper

Hello I am trying to create a rotating svg circle but its not rotating proper.
I flowing this link.
https://www.youtube.com/watch?reload=9&v=1lmFMsrLgwM
this is my code
HTML-----
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
img{
margin:auto;
text-align: center;
display: block;
}
</style>
</head>
<body>
<img src="wheal.svg"/>
</body>
</html>
svg code
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="100px" height="100px" viewBox="0 0 50 50" enable-background="new 0 0 50 50" xml:space="preserve">
<circle fill="none" stroke="#EC008C" stroke-width="2" stroke-dasharray="1.5" cx="25" cy="25" r="19.5">
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 50 50" to="360 50 50 " dur="10s" repeatCount="indefinite"/>
</circle>
</svg>
Please update your <animateTransform from="0 25 25" to="360 25 25" ... values, it works good after that, please have a look at the below working snippet. hope it help :)
svg {
margin: auto;
text-align: center;
display: block;
}
<svg xmlns="http://www.w3.org/2000/svg" width="100px" height="100px" viewBox="0 0 50 50">
<circle fill="none" stroke="#EC008C" stroke-width="2" stroke-dasharray="1.5" cx="25" cy="25" r="19.5">
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 25 25" to="360 25 25 " dur="10s" repeatCount="indefinite" />
</circle>
</svg>

SVG - CSS - draw animation on certain svg path

I have a kind of like Frankenstein svg with a scar on his face. What I would like to have is that his scar renders delayed. Kind of like drawing animations.
For the sake of completeness, it looks like:
The path of the scar in his face is:
<path id="scar" d="..."/>
As you can see I gave the path an id. In my CSS class I tried to assign the animation to the id:
#scar {
animation-name: draw;
animation-duration: 5s;
animation-fill-mode: forwards;
animation-iteration-count: 1;
animation-timing-function: linear;
}
#keyframes draw {
to {
stroke-dashoffset: 0;
}
}
But that did not work out...Someone any ideas?
Edit
full svg:
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 511.999 511.999" style="enable-background:new 0 0 511.999 511.999;" xml:space="preserve">
<path style="fill:#E6E6E6;" d="M303.852,190.448c6.972,0,12.645-5.672,12.645-12.643c0-0.591-0.041-1.177-0.123-1.758h-25.039
c-0.082,0.58-0.123,1.167-0.123,1.758C291.21,184.776,296.882,190.448,303.852,190.448z"/>
<path style="fill:#81AF31;" d="M138.086,170.102c-1.694,0.196-2.784,0.609-3.24,1.228c-2.083,2.834,2.176,25.193,2.176,25.193
c4.459,23.446,11.74,34.058,15.485,34.105c5.253,0.063,7.752-0.294,9.335-1.004c-5.151-15.979-8.764-33.807-10.78-53.428
C148.651,172.703,143.261,169.499,138.086,170.102z"/>
<path style="fill:#333333;" d="M157.9,147.714c2.222-3.334,4.743-7.113,4.743-9.26V43.563c0-3.238,2.624-5.863,5.863-5.863H343.49
c3.239,0,5.863,2.625,5.863,5.863v94.891c0,2.148,2.52,5.926,4.743,9.26c2.709,4.06,5.662,8.504,6.969,13.459
c1.834-0.922,3.77-1.629,5.747-2.117V34.668c0-11.647-9.476-21.122-21.123-21.122H166.305c-11.647,0-21.122,9.476-21.122,21.122
v124.386c1.978,0.487,3.915,1.193,5.748,2.114C152.24,156.214,155.194,151.772,157.9,147.714z"/>
<g>
<path style="fill:#81AF31;" d="M255.999,225.206c3.826,0,6.939-3.114,6.939-6.942v-42.218h-13.881v42.218
C249.057,222.091,252.171,225.206,255.999,225.206z"/>
<path style="fill:#81AF31;" d="M360.935,176.195c-2.017,19.622-5.628,37.451-10.78,53.43c1.582,0.711,4.081,1.068,9.333,1.003
c3.748-0.047,11.028-10.659,15.486-34.105c0,0,4.26-22.359,2.177-25.193c-0.456-0.619-1.545-1.033-3.241-1.228
C368.741,169.502,363.349,172.702,360.935,176.195z"/>
<path style="fill:#81AF31;" d="M298.518,256.794l-4.072,49.296c6.228-6.313,10.445-14.199,14.77-22.28
c2.907-5.436,5.915-11.056,9.545-16.162c9.219-12.964,16.482-28.583,21.787-46.663
C323.995,242.358,305.862,253.062,298.518,256.794z"/>
</g>
<path style="fill:#808080;" d="M321.407,308.647h21.395c1.826,0,2.751-1.536,2.751-4.564c0-3.029-0.925-4.564-2.751-4.564h-21.395
V308.647z"/>
<path style="fill:#E6E6E6;" d="M208.143,190.448c6.972,0,12.644-5.672,12.644-12.643c0-0.591-0.041-1.177-0.123-1.758h-25.039
c-0.082,0.58-0.123,1.167-0.123,1.758C195.5,184.776,201.172,190.448,208.143,190.448z"/>
<g>
<path style="fill:#81AF31;" d="M202.315,306.081v25.404c0.072,0.749,0.308,3.203,0.715,7.031
c4.108,19.926,26.153,35.31,52.967,36.028c26.787-0.716,48.813-16.068,52.954-35.962c0.414-3.854,0.655-6.327,0.728-7.092v-25.408
c-9.731,13.82-24.207,25.365-53.68,25.367h-0.001h-0.001h-0.001c0,0,0,0-0.001,0C226.523,331.448,212.047,319.903,202.315,306.081z
"/>
<path style="fill:#81AF31;" d="M281.955,314.86l2.903-35.145h-57.722l2.901,35.144c6.667,3.057,15.036,4.865,25.961,4.865
C266.92,319.723,275.289,317.916,281.955,314.86z"/>
</g>
<g>
<path style="fill:#333333;" d="M348.926,426.596c-0.827-1.343-1.078-2.962-0.697-4.492s1.363-2.841,2.723-3.64l35.987-21.1
c-20.172-18.65-51.77-43.244-66.646-54.629c-2.971,26.921-12.152,100.466-28.929,155.716h47.091l29.045-41.689L348.926,426.596z"/>
<path style="fill:#333333;" d="M125.056,397.365l35.987,21.1c1.36,0.797,2.342,2.109,2.723,3.64c0.381,1.53,0.13,3.15-0.697,4.492
l-18.575,30.167l29.045,41.689h47.064c-16.775-54.741-25.946-128.682-28.91-155.711
C176.815,354.128,145.225,378.718,125.056,397.365z"/>
</g>
<path style="fill:#808080;" d="M259.344,386.123c-0.449,0.11-6.243,0.11-6.691,0c-18.519-1.174-34.954-8.436-46.249-19.307
c4.611,35.257,13.223,89.888,26.485,131.636h46.206c13.239-42.128,21.846-96.495,26.465-131.605
C294.265,377.701,277.844,384.952,259.344,386.123z"/>
<path style="fill:#333333;" d="M338.196,341.72c18.52,14.397,46.087,36.457,62.535,52.573c1.304,1.278,1.938,3.092,1.717,4.904
c-0.223,1.813-1.278,3.418-2.854,4.342l-37.542,22.011l17.448,28.338c1.223,1.988,1.151,4.511-0.182,6.426l-26.571,38.138h71.719
v-41.491c0-3.237,2.624-5.863,5.863-5.863s5.863,2.625,5.863,5.863v41.491h61.725c0,0-31.312-91.272-31.438-91.438
C466.035,406.427,453.946,364.643,338.196,341.72z"/>
<path style="fill:#808080;" d="M190.589,299.519h-21.393c-1.827,0-2.752,1.535-2.752,4.564c0,3.028,0.925,4.564,2.752,4.564h21.393
V299.519z"/>
<g>
<path style="fill:#81AF31;" d="M202.782,283.809c4.323,8.08,8.541,15.964,14.766,22.277l-4.07-49.293
c-7.342-3.731-25.467-14.412-42.016-35.77c5.304,18.064,12.562,33.669,21.774,46.623
C196.866,272.752,199.873,278.373,202.782,283.809z"/>
<path style="fill:#81AF31;" d="M221.311,247.539c2.011,0.849,3.396,2.749,3.575,4.924l1.282,15.527h59.659l1.283-15.527
c0.181-2.183,1.564-4.085,3.587-4.928c0.36-0.151,37.185-16.15,57.28-61.928c0.84-6.081,1.533-12.337,2.036-18.815
c0.284-3.641-2.744-8.18-5.671-12.569c-3.301-4.949-6.714-10.068-6.714-15.767V49.426h-14.572v13.41
c0,3.238-2.624,5.863-5.863,5.863s-5.863-2.625-5.863-5.863v-13.41h-18.873v13.41c0,3.238-2.624,5.863-5.863,5.863
s-5.863-2.625-5.863-5.863v-13.41h-18.872v13.41c0,3.238-2.624,5.863-5.863,5.863c-3.239,0-5.863-2.625-5.863-5.863v-13.41h-18.872
v13.41c0,3.238-2.624,5.863-5.863,5.863s-5.863-2.625-5.863-5.863v-13.41h-18.872v13.41c0,3.238-2.624,5.863-5.863,5.863
s-5.863-2.625-5.863-5.863v-13.41h-14.571v89.028c0,5.699-3.412,10.816-6.714,15.765c-2.927,4.389-5.953,8.928-5.669,12.57
c0.504,6.48,1.197,12.738,2.037,18.819C184.119,231.383,220.941,247.382,221.311,247.539z M198.847,106.109
c-3.239,0-5.863-2.625-5.863-5.863s2.624-5.863,5.863-5.863h3.435V74.716c0-3.238,2.624-5.863,5.863-5.863
c3.239,0,5.863,2.625,5.863,5.863v19.668h3.435c3.239,0,5.863,2.625,5.863,5.863c0,3.238-2.624,5.863-5.863,5.863h-3.435v17.998
h3.435c3.239,0,5.863,2.625,5.863,5.863c0,3.238-2.624,5.863-5.863,5.863h-3.435v12.698c0,3.238-2.624,5.863-5.863,5.863
c-3.239,0-5.863-2.625-5.863-5.863v-12.698h-3.435c-3.239,0-5.863-2.625-5.863-5.863s2.624-5.863,5.863-5.863h3.435v-17.998
H198.847z M177.051,176.046c-3.239,0-5.863-2.625-5.863-5.863s2.624-5.863,5.863-5.863h157.895c3.239,0,5.863,2.625,5.863,5.863
s-2.624,5.863-5.863,5.863h-6.794c0.042,0.583,0.072,1.168,0.072,1.758c0,13.438-10.933,24.369-24.371,24.369
c-13.437,0-24.368-10.932-24.368-24.369c0-0.59,0.028-1.174,0.072-1.758h-4.891v32.096c9.068,2.563,15.744,10.878,15.744,20.757
c0,3.238-2.624,5.863-5.863,5.863s-5.863-2.625-5.863-5.863c0-3.34-1.672-6.287-4.215-8.076
c-1.254,9.083-9.047,16.107-18.468,16.107c-9.425,0-17.221-7.027-18.472-16.114c-2.545,1.789-4.214,4.742-4.214,8.083
c0,3.238-2.624,5.863-5.863,5.863c-3.239,0-5.863-2.625-5.863-5.863c0-9.88,6.673-18.214,15.744-20.777v-32.076h-4.89
c0.042,0.583,0.072,1.168,0.072,1.758c0,13.438-10.932,24.369-24.37,24.369c-13.437,0-24.369-10.932-24.369-24.369
c0-0.59,0.028-1.174,0.072-1.758H177.051z"/>
</g>
<path style="fill:#333333;" d="M132.496,453.888l17.448-28.338l-37.543-22.011c-1.576-0.924-2.63-2.529-2.854-4.342
c-0.222-1.813,0.413-3.626,1.717-4.904c16.444-16.111,44.004-38.165,62.524-52.562c-58.347,11.568-89.687,28.218-106.499,40.205
c-16.79,11.97-21.748,24.973-21.771,25.079c-0.047,0.203-31.437,91.438-31.437,91.438h61.725v-41.491
c0-3.237,2.624-5.863,5.863-5.863c3.239,0,5.863,2.625,5.863,5.863v41.491h71.719l-26.572-38.138
C131.344,458.398,131.273,455.875,132.496,453.888z"/>
<path id="scar" style="fill:#333333;" d="M198.847,124.107c-3.239,0-5.863,2.625-5.863,5.863c0,3.238,2.624,5.863,5.863,5.863h3.435v12.698
c0,3.238,2.624,5.863,5.863,5.863c3.239,0,5.863-2.625,5.863-5.863v-12.698h3.435c3.239,0,5.863-2.625,5.863-5.863
s-2.624-5.863-5.863-5.863h-3.435v-17.998h3.435c3.239,0,5.863-2.625,5.863-5.863s-2.624-5.863-5.863-5.863h-3.435V74.716
c0-3.238-2.624-5.863-5.863-5.863c-3.239,0-5.863,2.625-5.863,5.863v19.668h-3.435c-3.239,0-5.863,2.625-5.863,5.863
c0,3.238,2.624,5.863,5.863,5.863h3.435v17.998H198.847z"/>
<path d="M208.143,202.174c13.438,0,24.37-10.932,24.37-24.369c0-0.59-0.028-1.174-0.072-1.758h4.89v32.076
c-9.07,2.564-15.744,10.897-15.744,20.777c0,3.238,2.624,5.863,5.863,5.863s5.863-2.625,5.863-5.863c0-3.34,1.67-6.293,4.214-8.083
c1.251,9.086,9.047,16.114,18.472,16.114c9.422,0,17.215-7.024,18.468-16.107c2.543,1.788,4.215,4.736,4.215,8.076
c0,3.238,2.624,5.863,5.863,5.863s5.863-2.625,5.863-5.863c0-9.878-6.676-18.194-15.744-20.757v-32.096h4.891
c-0.042,0.583-0.072,1.168-0.072,1.758c0,13.438,10.931,24.369,24.368,24.369c13.438,0,24.371-10.932,24.371-24.369
c0-0.59-0.028-1.174-0.072-1.758h6.794c3.239,0,5.863-2.625,5.863-5.863s-2.624-5.863-5.863-5.863H177.051
c-3.239,0-5.863,2.625-5.863,5.863s2.624,5.863,5.863,5.863h6.794c-0.042,0.583-0.072,1.168-0.072,1.758
C183.774,191.242,194.706,202.174,208.143,202.174z M291.333,176.046h25.039c0.082,0.58,0.123,1.167,0.123,1.758
c0,6.971-5.673,12.643-12.645,12.643c-6.97,0-12.642-5.672-12.642-12.643C291.21,177.213,291.251,176.626,291.333,176.046z
M249.057,176.046h13.881v42.218c0,3.827-3.113,6.942-6.939,6.942c-3.828,0-6.942-3.114-6.942-6.942V176.046z M195.623,176.046
h25.039c0.082,0.58,0.123,1.167,0.123,1.758c0,6.971-5.672,12.643-12.644,12.643c-6.971,0-12.643-5.672-12.643-12.643
C195.5,177.213,195.541,176.626,195.623,176.046z"/>
<path d="M477.808,403.997c-1.481-5.345-18.783-54.621-156.401-77.228v-6.396h21.395c8.522,0,14.477-6.698,14.477-16.29
c0-9.592-5.953-16.29-14.477-16.29h-21.395V285.9c2.209-4.074,4.409-7.938,6.911-11.457c7.047-9.91,13.03-21.192,17.941-33.786
c3.325,1.314,12.893,1.704,13.377,1.697c16.189-0.202,23.775-27.428,26.858-43.639c0,0,5.216-27.376,0.107-34.327
c-1.898-2.582-4.607-4.35-8.062-5.298V34.668c0-18.112-14.735-32.848-32.849-32.848H166.305c-18.112,0-32.848,14.736-32.848,32.848
v124.42c-3.453,0.949-6.163,2.716-8.06,5.298c-5.11,6.952,0.106,34.328,0.106,34.328c3.084,16.211,10.673,43.437,26.857,43.639
c0.485,0.006,10.055-0.381,13.38-1.694c4.91,12.592,10.892,23.874,17.938,33.783c2.502,3.519,4.703,7.383,6.911,11.456v1.895
h-21.393c-8.525,0-14.478,6.698-14.478,16.29c0,9.592,5.953,16.29,14.478,16.29h21.393v6.396
c-137.624,22.609-154.921,71.89-156.401,77.229L0.319,502.408c-0.617,1.792-0.329,3.771,0.77,5.313s2.878,2.458,4.772,2.458h500.274
c1.895,0,3.673-0.916,4.772-2.458c1.1-1.542,1.388-3.521,0.77-5.313L477.808,403.997z M342.802,299.519
c1.826,0,2.751,1.535,2.751,4.564c0,3.028-0.925,4.564-2.751,4.564h-21.395v-9.127H342.802z M318.76,267.646
c-3.63,5.105-6.637,10.726-9.545,16.162c-4.324,8.081-8.542,15.967-14.77,22.28l4.072-49.296
c7.344-3.732,25.476-14.436,42.029-35.811C335.241,239.064,327.979,254.682,318.76,267.646z M255.995,331.449
c0.001,0,0.001,0,0.001,0h0.001h0.001H256c29.473-0.001,43.949-11.546,53.68-25.367v25.408c-0.074,0.765-0.315,3.238-0.728,7.092
c-4.142,19.893-26.167,35.246-52.954,35.962c-26.814-0.716-48.859-16.102-52.967-36.028c-0.408-3.827-0.645-6.282-0.715-7.031
v-25.404C212.047,319.903,226.523,331.448,255.995,331.449z M227.137,279.714h57.722l-2.903,35.145
c-6.667,3.056-15.035,4.863-25.958,4.863c-10.924,0-19.293-1.808-25.961-4.865L227.137,279.714z M373.911,170.102
c1.694,0.196,2.785,0.609,3.241,1.228c2.081,2.834-2.177,25.193-2.177,25.193c-4.458,23.446-11.739,34.058-15.486,34.105
c-5.252,0.066-7.751-0.292-9.333-1.003c5.152-15.979,8.764-33.809,10.78-53.43C363.349,172.702,368.741,169.502,373.911,170.102z
M145.183,34.668c0-11.647,9.475-21.122,21.122-21.122H345.69c11.647,0,21.123,9.476,21.123,21.122v124.389
c-1.978,0.487-3.914,1.194-5.747,2.117c-1.306-4.955-4.261-9.398-6.969-13.459c-2.222-3.334-4.743-7.113-4.743-9.26V43.563
c0-3.238-2.624-5.863-5.863-5.863H168.506c-3.239,0-5.863,2.625-5.863,5.863v94.891c0,2.147-2.52,5.926-4.743,9.26
c-2.708,4.058-5.66,8.5-6.968,13.453c-1.834-0.922-3.771-1.628-5.748-2.114V34.668H145.183z M152.508,230.629
c-3.745-0.047-11.026-10.659-15.485-34.105c0,0-4.26-22.359-2.176-25.193c0.456-0.619,1.544-1.033,3.24-1.228
c5.176-0.604,10.565,2.601,12.977,6.094c2.017,19.621,5.63,37.449,10.78,53.428C160.26,230.334,157.76,230.692,152.508,230.629z
M164.023,185.608c-0.841-6.081-1.534-12.339-2.037-18.819c-0.284-3.641,2.743-8.181,5.669-12.57
c3.301-4.949,6.714-10.067,6.714-15.765V49.426h14.571v13.41c0,3.238,2.624,5.863,5.863,5.863s5.863-2.625,5.863-5.863v-13.41
h18.872v13.41c0,3.238,2.624,5.863,5.863,5.863c3.239,0,5.863-2.625,5.863-5.863v-13.41h18.872v13.41
c0,3.238,2.624,5.863,5.863,5.863s5.863-2.625,5.863-5.863v-13.41h18.872v13.41c0,3.238,2.624,5.863,5.863,5.863
s5.863-2.625,5.863-5.863v-13.41h18.873v13.41c0,3.238,2.624,5.863,5.863,5.863s5.863-2.625,5.863-5.863v-13.41h14.572v89.028
c0,5.699,3.413,10.817,6.714,15.767c2.927,4.389,5.954,8.927,5.671,12.569c-0.504,6.479-1.196,12.735-2.036,18.815
c-20.095,45.778-56.92,61.777-57.28,61.928c-2.023,0.843-3.405,2.745-3.587,4.928l-1.283,15.527h-59.661l-1.282-15.527
c-0.179-2.175-1.564-4.076-3.575-4.924C220.941,247.382,184.119,231.383,164.023,185.608z M171.462,221.023
c16.549,21.358,34.675,32.039,42.016,35.77l4.07,49.293c-6.225-6.313-10.443-14.197-14.766-22.277
c-2.908-5.436-5.916-11.058-9.546-16.163C184.024,254.691,176.766,239.088,171.462,221.023z M169.197,308.647
c-1.827,0-2.752-1.536-2.752-4.564c0-3.029,0.925-4.564,2.752-4.564h21.393v9.127H169.197z M87.531,498.453v-41.491
c0-3.238-2.624-5.863-5.863-5.863c-3.239,0-5.863,2.625-5.863,5.863v41.491H14.08c0,0,31.39-91.236,31.437-91.438
c0.025-0.107,4.981-13.11,21.771-25.079c16.813-11.986,48.152-28.637,106.499-40.204c-18.52,14.397-46.079,36.451-62.524,52.562
c-1.304,1.278-1.938,3.091-1.717,4.904c0.223,1.813,1.278,3.418,2.854,4.342l37.543,22.011l-17.448,28.338
c-1.223,1.988-1.151,4.511,0.182,6.426l26.572,38.138H87.531V498.453z M173.541,498.453l-29.045-41.689l18.575-30.167
c0.827-1.343,1.078-2.962,0.697-4.492c-0.381-1.53-1.363-2.842-2.723-3.64l-35.987-21.1c20.169-18.647,51.759-43.236,66.638-54.623
c2.964,27.029,12.136,100.969,28.91,155.711h-47.065V498.453z M232.888,498.453c-13.261-41.748-21.875-96.377-26.485-131.636
c11.297,10.871,27.731,18.133,46.249,19.307c0.448,0.11,6.242,0.11,6.691,0c18.5-1.173,34.921-8.423,46.216-19.277
c-4.619,35.112-13.227,89.479-26.465,131.605h-46.206V498.453z M291.366,498.453c16.777-55.25,25.958-128.796,28.929-155.716
c14.875,11.385,46.474,35.979,66.646,54.629l-35.987,21.1c-1.36,0.799-2.342,2.109-2.723,3.64c-0.381,1.53-0.13,3.15,0.697,4.492
l18.575,30.167l-29.045,41.689H291.366z M436.193,498.453v-41.491c0-3.238-2.624-5.863-5.863-5.863s-5.863,2.625-5.863,5.863v41.491
h-71.719l26.571-38.138c1.334-1.915,1.405-4.438,0.182-6.426l-17.448-28.338l37.542-22.011c1.576-0.924,2.63-2.529,2.854-4.342
c0.222-1.812-0.413-3.626-1.717-4.904c-16.448-16.115-44.015-38.176-62.535-52.573c115.75,22.922,127.839,64.707,128.283,65.294
c0.125,0.167,31.438,91.438,31.438,91.438h-61.725V498.453z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
components hml:
<div class="row">
<div class="col-md-8">
<div class="col-md-12">
<h1 class="text-focus-in">Welcome, to shock-me.de</h1>
</div>
<div class="mt-6 row">
<div class="col-md-6">
<img class="slide-in-fwd-center" src="./../../../assets/ghost.svg" alt="ghost" width="150px" height="auto">
</div>
<div class="col-md-6">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 511.999 511.999" style="enable-background:new 0 0 511.999 511.999;" xml:space="preserve">
... <== the paths included above
</svg>
</div>
</div>
</div>
</div>
do you need this ?
remember that you need to have an stroke on path to animate it.
svg { width: 200px; }
#scar {
stroke: #000;
stroke-width: 4px;
fill: none;
stroke-dasharray: 900;
stroke-dashoffset: 900;
animation: draw 2s linear 1 forwards;
}
#keyframes draw {
to {
stroke-dashoffset: 0;
fill: #000;
}
}
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 511.999 511.999" style="enable-background:new 0 0 511.999 511.999;" xml:space="preserve">
<path id="scar" d="M198.847,124.107c-3.239,0-5.863,2.625-5.863,5.863c0,3.238,2.624,5.863,5.863,5.863h3.435v12.698
c0,3.238,2.624,5.863,5.863,5.863c3.239,0,5.863-2.625,5.863-5.863v-12.698h3.435c3.239,0,5.863-2.625,5.863-5.863
s-2.624-5.863-5.863-5.863h-3.435v-17.998h3.435c3.239,0,5.863-2.625,5.863-5.863s-2.624-5.863-5.863-5.863h-3.435V74.716
c0-3.238-2.624-5.863-5.863-5.863c-3.239,0-5.863,2.625-5.863,5.863v19.668h-3.435c-3.239,0-5.863,2.625-5.863,5.863
c0,3.238,2.624,5.863,5.863,5.863h3.435v17.998H198.847z"/>
</svg>

Chaining Multiple CSS Animations on SVG in Infinite Loop

I have two animated svg's, with two separate animations. I would like to chain them (and maybe more in the future) — infinite on one element. I would prefer CSS only.
I have tried to chain them like this question Chaining Multiple CSS Animations, but it seems that it is harder with the infinite loop — or there might be something wrong with my #keyframes (too simple).
The code can be found here: https://codepen.io/Miet/pen/bWWONo
The HTML:
<?xml version="1.0" encoding="utf-8"?>
<div class="svg-container">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 35 22" style="enable-background:new 0 0 32.4 21.7;" xml:space="preserve">
<g>
<path class="st0" d="M2.5,13.2c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4C-0.1,12.1,1.1,13.2,2.5,13.2"
/>
<path class="st0" d="M29.9,13.2c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4
C27.3,12.1,28.4,13.2,29.9,13.2"/>
<path class="st0" d="M8,7.2c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4C5.4,6.2,6.5,7.2,8,7.2"/>
<path class="st0" d="M24.4,7.2c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4C21.8,6.2,23,7.2,24.4,7.2"/>
<path class="st0" d="M16.2,21.6c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4
C13.6,20.5,14.8,21.6,16.2,21.6"/>
<path class="st0" d="M16.2,4.9c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4C13.6,3.8,14.8,4.9,16.2,4.9"/>
</g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0" y1="10.853" x2="32.3588" y2="10.853">
<stop offset="0.2597" style="stop-color:#EE3251"/>
<stop offset="1" style="stop-color:#F47529"/>
</linearGradient>
<polyline class="st1" points="16.2,2.5 24.4,4.9 2.5,10.9 8.1,4.8 16.2,19.2 30.1,10.8 "/>
</svg>
</div>
<div class="svg-container">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 35 22" style="enable-background:new 0 0 32.4 21.7;" xml:space="preserve">
<g>
<path class="st0" d="M2.5,13.2c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4C-0.1,12.1,1.1,13.2,2.5,13.2"
/>
<path class="st0" d="M29.9,13.2c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4
C27.3,12.1,28.4,13.2,29.9,13.2"/>
<path class="st0" d="M8,7.2c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4C5.4,6.2,6.5,7.2,8,7.2"/>
<path class="st0" d="M24.4,7.2c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4C21.8,6.2,23,7.2,24.4,7.2"/>
<path class="st0" d="M16.2,21.6c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4
C13.6,20.5,14.8,21.6,16.2,21.6"/>
<path class="st0" d="M16.2,4.9c1.4,0,2.6-1.1,2.6-2.4c0-1.3-1.1-2.4-2.6-2.4c-1.4,0-2.6,1.1-2.6,2.4C13.6,3.8,14.8,4.9,16.2,4.9"/>
</g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0" y1="10.853" x2="32.3588" y2="10.853">
<stop offset="0.2597" style="stop-color:#EE3251"/>
<stop offset="1" style="stop-color:#F47529"/>
</linearGradient>
<polyline class="st2" points="16.2,2.5 24.4,4.9 2.5,10.9 8.1,4.8 16.2,19.2 30.1,10.8 "/>
</svg>
</div>
The CSS:
svg {
width: 20em;
display: block;
margin: 5em auto;
padding: 1rem;
}
.svg-container {
width: 49%;
display: inline-block;
min-width: 21em;
}
g {
cursor: pointer;
}
.st0 {
fill:#EE3251;
}
.st1,
.st2 {
stroke-dasharray: 60;
fill: none;
stroke: url(#SVGID_1_);
stroke-width: 5;
stroke-linecap: round;
stroke-linejoin: round;
stroke-miterlimit: 10;
}
.st1 {
animation: dash 4s infinite ease-in-out alternate;
}
.st2 {
animation: dashLong 2500ms infinite linear;
}
#keyframes dash {
from {
stroke-dashoffset: 200;
}
}
#keyframes dashLong {
from {
stroke-dashoffset: 120;
}
}

Resources