I'm looking for a way to make responsive a SVG image and a text above it, that are centered in the page. The solution posted here doesn't work in my case.
Here is my code:
body {
background: white;
font-family: "Lucida Console", Monaco, monospace;
}
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.text-line {
text-align: center;
color: #2a2f33;
position: relative;
white-space: nowrap;
overflow: hidden;
}
<div class="container">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512px" height="118px" viewBox="0 0 512 118" version="1.1" preserveAspectRatio="xMidYMid">
<defs>
<linearGradient x1="63.809892%" y1="70.3374666%" x2="32.3301087%" y2="22.2678268%" id="linearGradient-1">
<stop stop-color="#FCD08F" offset="0%"/>
<stop stop-color="#F79673" offset="100%"/>
</linearGradient>
<linearGradient x1="87.2564115%" y1="28.4536279%" x2="13.5510427%" y2="89.1540742%" id="linearGradient-2">
<stop stop-color="#E74047" offset="0%"/>
<stop stop-color="#7F50A0" offset="100%"/>
</linearGradient>
<linearGradient x1="87.6749398%" y1="70.707777%" x2="12.8241649%" y2="11.4981431%" id="linearGradient-3">
<stop stop-color="#E6FFAB" offset="0%"/>
<stop stop-color="#47BEBC" offset="100%"/>
</linearGradient>
<linearGradient x1="50.0011435%" y1="99.9998449%" x2="50.0011435%" y2="0.000388913438%" id="linearGradient-4">
<stop stop-color="#84E9DB" offset="0%"/>
<stop stop-color="#197491" offset="100%"/>
</linearGradient>
</defs>
<g>
<g transform="translate(0.000000, -0.000009)" fill-rule="nonzero">
<path d="M427.167431,30.8014194 L431.494833,30.8014194 L431.494833,83.527398 L427.167431,83.527398 L427.167431,30.8014194 Z M469.758178,77.2640501 C469.758178,80.2822992 471.238605,83.5273953 471.238605,83.5273953 L466.227929,83.5273953 C466.227929,83.5273953 464.861381,80.6804202 464.861381,78.0612031 C464.861381,78.0612031 459.79331,84.4384273 450.740384,84.4384273 C441.687459,84.4384273 437.985936,79.7119931 437.985936,73.0505269 C437.985936,66.3890608 444.078007,61.6626266 456.434335,61.6626266 L465.089139,61.6480501 L465.089139,56.5380714 C465.089139,56.5380714 465.203018,47.9971462 454.61227,47.9971462 C444.021523,47.9971462 444.249281,55.3847049 444.249281,55.3847049 L439.580242,55.3992814 C439.580242,55.3992814 439.997495,44.5771319 454.726149,44.5771319 C469.454804,44.5771319 469.758178,56.0825554 469.758178,56.0825554 L469.758178,77.2640501 Z M465.089139,69.6915519 L465.089139,64.9077227 L456.092698,64.9077227 C448.690562,64.9077227 442.59758,68.2676088 442.59758,73.392164 C442.59758,78.5167191 446.469466,80.7378152 451.138505,80.7378152 C455.807544,80.7378152 465.089139,77.3788401 465.089139,69.6915519 Z M474.237722,45.4918081 L478.792883,45.4918081 L492.913879,77.9099718 L506.655886,45.4918081 L511.817794,45.4918081 C511.817794,45.4918081 493.825822,87.8165341 492.154989,91.802301 C490.484157,95.7880661 486.498391,99.4704576 481.602505,99.4704576 C479.39963,99.4704576 477.198577,98.1795252 477.198577,98.1795252 L478.413893,94.7631551 C478.413893,94.7631551 479.515331,95.3708135 481.678121,95.3708135 C483.840911,95.3708135 487.599829,90.3601355 487.599829,90.3601355 L490.332925,83.8307689 L474.237722,45.4918081 Z M404.438093,44.5771319 C412.637381,44.5771319 421.519943,50.1180287 421.519943,64.2034949 C421.519943,78.2889611 414.117808,84.4384273 404.551972,84.4384273 C395.15832,84.4384273 390.935687,77.5346266 390.787189,77.2868259 L390.787189,98.1039096 L390.772612,98.1039096 L386.459786,98.1039096 L386.459786,45.4918081 L390.772612,45.4918081 L390.787189,45.4918081 L390.787189,51.3952956 C390.937509,51.2094451 396.353594,44.5771319 404.438093,44.5771319 Z M403.754819,80.9081782 C411.726349,80.9081782 417.078662,73.7292458 417.078662,64.5068686 C417.078662,55.2844914 411.270833,48.2239931 404.324214,48.2239931 C396.683388,48.2239931 390.93842,55.9714095 390.787189,56.1763917 L390.787189,72.6177867 C390.937509,72.8646764 395.905367,80.9081782 403.754819,80.9081782 Z M183.251359,34.5238935 L176.929708,40.482954 L174.005295,41.2664415 L175.823715,38.2864558 C175.823715,38.2864558 170.21358,30.9162067 160.256,30.9162067 C150.300242,30.9162067 138.842192,37.6988401 138.842192,53.7311818 C138.842192,66.8637084 149.469381,81.2498152 165.867957,81.2498152 C171.536399,81.2498152 175.270719,79.1334878 175.270719,79.1334878 L175.270719,67.3738864 C175.270719,67.3738864 166.835473,67.2754949 163.654149,68.0790252 L169.581324,64.7856444 L186.412641,64.7856444 C186.412641,64.7856444 183.251359,66.3945269 183.251359,71.0580999 C183.251359,75.724406 183.251359,80.5464985 183.251359,80.5464985 C183.251359,80.5464985 171.04353,84.544107 160.177651,84.544107 C139.157409,84.544107 130.702121,69.09847 130.702121,56.866954 C130.702121,42.872591 141.884128,28.0947405 161.126036,28.0947405 C176.930619,28.0947405 183.251359,34.5238935 183.251359,34.5238935 Z M210.001993,44.7283632 C221.282391,44.7283632 229.638377,52.5823704 229.638377,64.1133027 C229.638377,75.6442351 221.030947,83.8307689 208.748413,83.8307689 C196.467701,83.8307689 189.532925,73.4705127 189.532925,64.8649042 C189.532925,52.9158081 198.723416,44.7283632 210.001993,44.7283632 Z M210.837409,81.3236088 C220.146335,81.3236088 221.44911,71.7987689 221.448199,67.9560358 C221.448199,56.7977156 215.849907,47.2346124 207.745367,47.2346124 C202.065082,47.2346124 197.134577,52.4147405 197.134577,59.683865 C197.134577,66.9539006 201.529395,81.3236088 210.837409,81.3236088 Z M253.891872,44.748406 C265.166804,44.748406 273.517324,52.5987689 273.517324,64.1242351 C273.517324,75.6497013 264.91627,83.83168 252.639203,83.83168 C240.363046,83.83168 233.431915,73.4759789 233.431915,64.8749255 C233.431915,52.9322067 242.617851,44.748406 253.891872,44.748406 Z M254.726377,81.3254309 C264.031658,81.3254309 265.333523,71.8051462 265.333523,67.9633241 C265.333523,56.8122921 259.738875,47.253744 251.637068,47.253744 C245.959516,47.253744 241.030833,52.431139 241.030833,59.6957084 C241.030833,66.9611889 245.423829,81.3254309 254.726377,81.3254309 Z M305.905423,81.0594095 C309.933096,83.8407903 312.710833,87.8037796 312.712655,93.0103295 C312.712655,103.926315 299.143744,108.199055 291.216854,108.199055 C283.290875,108.199055 273.622093,104.98129 273.622093,96.4139451 C273.622093,82.2428401 295.740128,82.2227974 295.740128,82.2227974 C295.740128,82.2227974 293.376,79.7748544 293.376,77.035381 C293.376,75.355438 293.956327,74.0881924 293.956327,74.0881924 C293.956327,74.0881924 293.292185,74.2959077 292.296427,74.2959077 C282.709637,74.2959077 277.854747,67.449502 277.854747,61.7236657 C277.854747,53.5899718 285.241395,46.0366052 295.034989,46.0366052 C304.826762,46.0366052 314.122021,46.0366052 314.122021,46.0366052 L309.226135,48.9418864 L304.330249,49.1067832 C304.330249,49.1067832 309.475758,52.5094878 309.475758,60.1457583 C309.475758,65.2921782 306.859274,68.1345981 303.996811,70.8531177 C301.134349,73.5707262 301.09153,74.5455305 301.09153,75.7480928 C301.09153,76.9515661 301.879573,78.2807618 305.905423,81.0594095 Z M295.40669,71.8060572 C301.19721,71.8060572 302.315046,67.2627405 302.315046,63.9010323 C302.315046,54.2532031 296.839744,48.9619291 292.231744,48.9619291 C287.625566,48.9619291 285.011815,52.6971604 285.011815,57.9264842 C285.011815,63.1548971 289.617993,71.8060572 295.40669,71.8060572 Z M294.972128,104.671539 C297.646918,104.671539 306.922135,103.926315 306.922135,95.8946569 C306.922135,90.2945412 302.44168,88.5198508 298.393964,84.941317 C298.393964,84.941317 297.088456,84.7226693 295.561566,84.7226693 C294.036498,84.7226693 280.904883,85.5644629 280.904883,94.589148 C280.904883,103.613831 292.295516,104.671539 294.972128,104.671539 Z M313.144484,28.2459718 L318.604299,25.2668971 L330.582548,25.2668971 C327.791146,26.7564344 326.745281,27.9362209 326.67331,34.8864842 C326.601338,41.8349255 326.237836,77.233075 326.237836,77.233075 C326.237836,79.8823561 328.541836,80.6002494 330.618078,80.6002494 C332.507559,80.6002494 333.37395,80.9673953 333.37395,80.9673953 L330.83126,82.7357084 L316.307587,82.7357084 C316.307587,82.7357084 318.39294,80.8717369 318.418448,79.0123205 L319.163673,28.2605483 L313.144484,28.2459718 Z M366.114619,54.8927476 L347.07405,62.526285 L340.615744,62.8624558 C340.615744,62.8624558 356.762875,56.2775163 357.392399,55.1451035 C358.019189,54.0136017 356.720968,47.5962921 349.591231,47.5962921 C346.037295,47.5962921 340.363388,50.8668971 340.363388,59.0042351 C340.363388,71.0808757 349.423601,79.3020287 357.222036,79.3020287 C362.423117,79.3020287 367.120399,76.5334024 367.120399,76.5334024 C367.120399,76.5334024 362.674562,83.8307689 352.860925,83.8307689 C338.853808,83.8307689 333.233651,73.1771604 333.233651,63.7006052 C333.233651,54.223139 339.609964,44.5771319 351.855146,44.5771319 C364.100327,44.5771319 366.114619,54.8927476 366.114619,54.8927476 Z" fill="#808285"/>
<g>
<path d="M81.2440142,77.0025839 C95.1709609,69.3799789 105.80726,63.5575732 106.774776,63.0273526 C109.660925,61.447623 112.684641,57.4163063 106.774776,54.193986 C104.875274,53.1563205 94.5250391,47.5124771 81.2276157,40.2579291 L62.9386477,58.687196 L81.2440142,77.0025839 Z" fill="url(#linearGradient-1)"/>
<path d="M62.9377367,58.687196 L4.44219217,117.629148 C5.76318861,117.796778 7.35202847,117.446942 9.17955872,116.446628 C12.9630747,114.375853 53.5951032,92.1348277 81.2440142,77.0007618 L62.9377367,58.687196 Z" fill="url(#linearGradient-2)"/>
<path d="M62.9377367,58.687196 L81.2267046,40.2579291 C81.2267046,40.2579291 13.2491388,3.1707266 9.17955872,0.950541548 C7.61531673,0.0969045651 5.90986477,-0.201002908 4.4002847,0.13516791 L62.9377367,58.687196 Z" fill="url(#linearGradient-3)"/>
<path d="M62.9377367,58.687196 L4.39937367,0.136078942 C1.98149466,0.675409903 0,2.76805045 0,6.97428532 C0,13.8070252 0,104.867411 0,110.60418 C0,114.565347 1.5587758,117.351283 4.44128114,117.629148 L62.9377367,58.687196 Z" fill="url(#linearGradient-4)"/>
</g>
</g>
</g>
</svg>
<div class="text-line">Some text under the SVG image</div>
</div>
Link to JsFiddle
As you can see I set white-space: nowrap; to avoid text going to new line in case of small displays.
Now, how can I edit my code to make both SVG image and text to scale according to different device resolution and keeping to being centered in the page?
Consider using viewport-related sizing units, in this case vw:
body {
background: white;
font-family: "Lucida Console", Monaco, monospace;
}
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 25em;
font-size:2vw;
}
.text-line {
text-align: center;
color: #2a2f33;
position: relative;
white-space: nowrap;
overflow: hidden;
}
<div class="container">
<svg viewBox="0 0 512 118">
<defs>
<linearGradient x1="63.809892%" y1="70.3374666%" x2="32.3301087%" y2="22.2678268%" id="linearGradient-1">
<stop stop-color="#FCD08F" offset="0%"/>
<stop stop-color="#F79673" offset="100%"/>
</linearGradient>
<linearGradient x1="87.2564115%" y1="28.4536279%" x2="13.5510427%" y2="89.1540742%" id="linearGradient-2">
<stop stop-color="#E74047" offset="0%"/>
<stop stop-color="#7F50A0" offset="100%"/>
</linearGradient>
<linearGradient x1="87.6749398%" y1="70.707777%" x2="12.8241649%" y2="11.4981431%" id="linearGradient-3">
<stop stop-color="#E6FFAB" offset="0%"/>
<stop stop-color="#47BEBC" offset="100%"/>
</linearGradient>
<linearGradient x1="50.0011435%" y1="99.9998449%" x2="50.0011435%" y2="0.000388913438%" id="linearGradient-4">
<stop stop-color="#84E9DB" offset="0%"/>
<stop stop-color="#197491" offset="100%"/>
</linearGradient>
</defs>
<g>
<g transform="translate(0.000000, -0.000009)" fill-rule="nonzero">
<path d="M427.167431,30.8014194 L431.494833,30.8014194 L431.494833,83.527398 L427.167431,83.527398 L427.167431,30.8014194 Z M469.758178,77.2640501 C469.758178,80.2822992 471.238605,83.5273953 471.238605,83.5273953 L466.227929,83.5273953 C466.227929,83.5273953 464.861381,80.6804202 464.861381,78.0612031 C464.861381,78.0612031 459.79331,84.4384273 450.740384,84.4384273 C441.687459,84.4384273 437.985936,79.7119931 437.985936,73.0505269 C437.985936,66.3890608 444.078007,61.6626266 456.434335,61.6626266 L465.089139,61.6480501 L465.089139,56.5380714 C465.089139,56.5380714 465.203018,47.9971462 454.61227,47.9971462 C444.021523,47.9971462 444.249281,55.3847049 444.249281,55.3847049 L439.580242,55.3992814 C439.580242,55.3992814 439.997495,44.5771319 454.726149,44.5771319 C469.454804,44.5771319 469.758178,56.0825554 469.758178,56.0825554 L469.758178,77.2640501 Z M465.089139,69.6915519 L465.089139,64.9077227 L456.092698,64.9077227 C448.690562,64.9077227 442.59758,68.2676088 442.59758,73.392164 C442.59758,78.5167191 446.469466,80.7378152 451.138505,80.7378152 C455.807544,80.7378152 465.089139,77.3788401 465.089139,69.6915519 Z M474.237722,45.4918081 L478.792883,45.4918081 L492.913879,77.9099718 L506.655886,45.4918081 L511.817794,45.4918081 C511.817794,45.4918081 493.825822,87.8165341 492.154989,91.802301 C490.484157,95.7880661 486.498391,99.4704576 481.602505,99.4704576 C479.39963,99.4704576 477.198577,98.1795252 477.198577,98.1795252 L478.413893,94.7631551 C478.413893,94.7631551 479.515331,95.3708135 481.678121,95.3708135 C483.840911,95.3708135 487.599829,90.3601355 487.599829,90.3601355 L490.332925,83.8307689 L474.237722,45.4918081 Z M404.438093,44.5771319 C412.637381,44.5771319 421.519943,50.1180287 421.519943,64.2034949 C421.519943,78.2889611 414.117808,84.4384273 404.551972,84.4384273 C395.15832,84.4384273 390.935687,77.5346266 390.787189,77.2868259 L390.787189,98.1039096 L390.772612,98.1039096 L386.459786,98.1039096 L386.459786,45.4918081 L390.772612,45.4918081 L390.787189,45.4918081 L390.787189,51.3952956 C390.937509,51.2094451 396.353594,44.5771319 404.438093,44.5771319 Z M403.754819,80.9081782 C411.726349,80.9081782 417.078662,73.7292458 417.078662,64.5068686 C417.078662,55.2844914 411.270833,48.2239931 404.324214,48.2239931 C396.683388,48.2239931 390.93842,55.9714095 390.787189,56.1763917 L390.787189,72.6177867 C390.937509,72.8646764 395.905367,80.9081782 403.754819,80.9081782 Z M183.251359,34.5238935 L176.929708,40.482954 L174.005295,41.2664415 L175.823715,38.2864558 C175.823715,38.2864558 170.21358,30.9162067 160.256,30.9162067 C150.300242,30.9162067 138.842192,37.6988401 138.842192,53.7311818 C138.842192,66.8637084 149.469381,81.2498152 165.867957,81.2498152 C171.536399,81.2498152 175.270719,79.1334878 175.270719,79.1334878 L175.270719,67.3738864 C175.270719,67.3738864 166.835473,67.2754949 163.654149,68.0790252 L169.581324,64.7856444 L186.412641,64.7856444 C186.412641,64.7856444 183.251359,66.3945269 183.251359,71.0580999 C183.251359,75.724406 183.251359,80.5464985 183.251359,80.5464985 C183.251359,80.5464985 171.04353,84.544107 160.177651,84.544107 C139.157409,84.544107 130.702121,69.09847 130.702121,56.866954 C130.702121,42.872591 141.884128,28.0947405 161.126036,28.0947405 C176.930619,28.0947405 183.251359,34.5238935 183.251359,34.5238935 Z M210.001993,44.7283632 C221.282391,44.7283632 229.638377,52.5823704 229.638377,64.1133027 C229.638377,75.6442351 221.030947,83.8307689 208.748413,83.8307689 C196.467701,83.8307689 189.532925,73.4705127 189.532925,64.8649042 C189.532925,52.9158081 198.723416,44.7283632 210.001993,44.7283632 Z M210.837409,81.3236088 C220.146335,81.3236088 221.44911,71.7987689 221.448199,67.9560358 C221.448199,56.7977156 215.849907,47.2346124 207.745367,47.2346124 C202.065082,47.2346124 197.134577,52.4147405 197.134577,59.683865 C197.134577,66.9539006 201.529395,81.3236088 210.837409,81.3236088 Z M253.891872,44.748406 C265.166804,44.748406 273.517324,52.5987689 273.517324,64.1242351 C273.517324,75.6497013 264.91627,83.83168 252.639203,83.83168 C240.363046,83.83168 233.431915,73.4759789 233.431915,64.8749255 C233.431915,52.9322067 242.617851,44.748406 253.891872,44.748406 Z M254.726377,81.3254309 C264.031658,81.3254309 265.333523,71.8051462 265.333523,67.9633241 C265.333523,56.8122921 259.738875,47.253744 251.637068,47.253744 C245.959516,47.253744 241.030833,52.431139 241.030833,59.6957084 C241.030833,66.9611889 245.423829,81.3254309 254.726377,81.3254309 Z M305.905423,81.0594095 C309.933096,83.8407903 312.710833,87.8037796 312.712655,93.0103295 C312.712655,103.926315 299.143744,108.199055 291.216854,108.199055 C283.290875,108.199055 273.622093,104.98129 273.622093,96.4139451 C273.622093,82.2428401 295.740128,82.2227974 295.740128,82.2227974 C295.740128,82.2227974 293.376,79.7748544 293.376,77.035381 C293.376,75.355438 293.956327,74.0881924 293.956327,74.0881924 C293.956327,74.0881924 293.292185,74.2959077 292.296427,74.2959077 C282.709637,74.2959077 277.854747,67.449502 277.854747,61.7236657 C277.854747,53.5899718 285.241395,46.0366052 295.034989,46.0366052 C304.826762,46.0366052 314.122021,46.0366052 314.122021,46.0366052 L309.226135,48.9418864 L304.330249,49.1067832 C304.330249,49.1067832 309.475758,52.5094878 309.475758,60.1457583 C309.475758,65.2921782 306.859274,68.1345981 303.996811,70.8531177 C301.134349,73.5707262 301.09153,74.5455305 301.09153,75.7480928 C301.09153,76.9515661 301.879573,78.2807618 305.905423,81.0594095 Z M295.40669,71.8060572 C301.19721,71.8060572 302.315046,67.2627405 302.315046,63.9010323 C302.315046,54.2532031 296.839744,48.9619291 292.231744,48.9619291 C287.625566,48.9619291 285.011815,52.6971604 285.011815,57.9264842 C285.011815,63.1548971 289.617993,71.8060572 295.40669,71.8060572 Z M294.972128,104.671539 C297.646918,104.671539 306.922135,103.926315 306.922135,95.8946569 C306.922135,90.2945412 302.44168,88.5198508 298.393964,84.941317 C298.393964,84.941317 297.088456,84.7226693 295.561566,84.7226693 C294.036498,84.7226693 280.904883,85.5644629 280.904883,94.589148 C280.904883,103.613831 292.295516,104.671539 294.972128,104.671539 Z M313.144484,28.2459718 L318.604299,25.2668971 L330.582548,25.2668971 C327.791146,26.7564344 326.745281,27.9362209 326.67331,34.8864842 C326.601338,41.8349255 326.237836,77.233075 326.237836,77.233075 C326.237836,79.8823561 328.541836,80.6002494 330.618078,80.6002494 C332.507559,80.6002494 333.37395,80.9673953 333.37395,80.9673953 L330.83126,82.7357084 L316.307587,82.7357084 C316.307587,82.7357084 318.39294,80.8717369 318.418448,79.0123205 L319.163673,28.2605483 L313.144484,28.2459718 Z M366.114619,54.8927476 L347.07405,62.526285 L340.615744,62.8624558 C340.615744,62.8624558 356.762875,56.2775163 357.392399,55.1451035 C358.019189,54.0136017 356.720968,47.5962921 349.591231,47.5962921 C346.037295,47.5962921 340.363388,50.8668971 340.363388,59.0042351 C340.363388,71.0808757 349.423601,79.3020287 357.222036,79.3020287 C362.423117,79.3020287 367.120399,76.5334024 367.120399,76.5334024 C367.120399,76.5334024 362.674562,83.8307689 352.860925,83.8307689 C338.853808,83.8307689 333.233651,73.1771604 333.233651,63.7006052 C333.233651,54.223139 339.609964,44.5771319 351.855146,44.5771319 C364.100327,44.5771319 366.114619,54.8927476 366.114619,54.8927476 Z" fill="#808285"/>
<g>
<path d="M81.2440142,77.0025839 C95.1709609,69.3799789 105.80726,63.5575732 106.774776,63.0273526 C109.660925,61.447623 112.684641,57.4163063 106.774776,54.193986 C104.875274,53.1563205 94.5250391,47.5124771 81.2276157,40.2579291 L62.9386477,58.687196 L81.2440142,77.0025839 Z" fill="url(#linearGradient-1)"/>
<path d="M62.9377367,58.687196 L4.44219217,117.629148 C5.76318861,117.796778 7.35202847,117.446942 9.17955872,116.446628 C12.9630747,114.375853 53.5951032,92.1348277 81.2440142,77.0007618 L62.9377367,58.687196 Z" fill="url(#linearGradient-2)"/>
<path d="M62.9377367,58.687196 L81.2267046,40.2579291 C81.2267046,40.2579291 13.2491388,3.1707266 9.17955872,0.950541548 C7.61531673,0.0969045651 5.90986477,-0.201002908 4.4002847,0.13516791 L62.9377367,58.687196 Z" fill="url(#linearGradient-3)"/>
<path d="M62.9377367,58.687196 L4.39937367,0.136078942 C1.98149466,0.675409903 0,2.76805045 0,6.97428532 C0,13.8070252 0,104.867411 0,110.60418 C0,114.565347 1.5587758,117.351283 4.44128114,117.629148 L62.9377367,58.687196 Z" fill="url(#linearGradient-4)"/>
</g>
</g>
</g>
</svg>
<div class="text-line">Some text under the SVG image</div>
</div>
I've got a small problem that I'm sure is just a simple fix, but I just haven't been able to fix it with how I usually do things.
I've created an SVG logo in Sketch, and exported it and just wanted to make a simple loading animation, just rotating circles, one rotating clockwise and one rotating counter-clockwise. This should have been pretty simple, but when I got to the inner circle, it's rotating around a different axis. I put transform-origin: center on it, and it did nothing. I did transform-origin: fill-box and it got it rotating (on its inner axis) in the top left corner, so still not what I wanted. And I've taken the inline transform off, to no avail. The HTML code is here:
<div class='loading-screen'>
<svg width="62px" height="62px" viewBox="0 0 62 62" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->
<title>Group 11 Copy 9</title>
<desc>Created with Sketch.</desc>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group-11-Copy-9">
<g id="Group-75-Copy" fill="#425563">
<path d="M30.5749355,61.1497976 C29.8994748,61.1497976 29.3519395,60.6028093 29.3519395,59.9280234 L29.3519395,53.2156572 C29.3519395,52.5408713 29.8994748,51.993883 30.5749355,51.993883 C31.2503961,51.993883 31.7979314,52.5408713 31.7979314,53.2156572 L31.7979314,59.9280234 C31.7979314,60.6028093 31.2503961,61.1497976 30.5749355,61.1497976" id="Fill-1"></path>
<path d="M38.4886365,60.1022789 C37.8362293,60.2768705 37.1655995,59.8901178 36.9908334,59.2383013 L35.2517331,52.7547123 C35.076967,52.1029569 35.4641064,51.432997 36.1165747,51.2583444 C36.7689819,51.0836918 37.4396118,51.4704444 37.614439,52.1222609 L39.3534781,58.605911 C39.5282442,59.2576664 39.1411049,59.9276263 38.4886365,60.1022789" id="Fill-3"></path>
<path d="M45.8315103,57.0489187 C45.2466125,57.3862505 44.498567,57.1860628 44.1608979,56.6017493 L40.801328,50.7886089 C40.4635977,50.2042343 40.6640467,49.4570583 41.2490057,49.1196042 C41.8339035,48.7822724 42.5818878,48.9824601 42.9196181,49.5668347 L46.2791269,55.3799751 C46.6169183,55.9642886 46.4164081,56.7115257 45.8315103,57.0489187" id="Fill-5"></path>
<path d="M52.173949,52.1828792 C51.6963079,52.6600431 50.921968,52.6600431 50.4443881,52.1828792 L45.6932934,47.4365309 C45.2156524,46.959367 45.2156524,46.1858007 45.6932934,45.7086979 C46.1708734,45.231534 46.9452133,45.231534 47.4228543,45.7086979 L52.173949,50.4550462 C52.6515901,50.932149 52.6515901,51.7057153 52.173949,52.1828792" id="Fill-7"></path>
<path d="M57.0571517,45.8797096 C56.7194825,46.4640231 55.971437,46.6642719 55.3865392,46.3268789 L49.5675856,42.9707264 C48.9826878,42.6332723 48.7822388,41.8860963 49.1199691,41.3017828 C49.4576994,40.7173472 50.2056838,40.5171595 50.7905816,40.8544913 L56.6095352,44.210705 C57.194433,44.5480979 57.3948209,45.295335 57.0571517,45.8797096" id="Fill-9"></path>
<path d="M60.0897414,38.5201879 C59.9149141,39.1719433 59.2443454,39.558757 58.5918771,39.3841044 L52.1017433,37.6468026 C51.4493361,37.4722111 51.0621356,36.8022512 51.2369629,36.1504347 C51.4117901,35.4986793 52.08242,35.1118656 52.7348272,35.2865182 L59.2248998,37.02382 C59.8773681,37.1984115 60.2645075,37.8683714 60.0897414,38.5201879" id="Fill-11"></path>
<path d="M61.1496508,30.6054126 C61.1496508,31.2801374 60.6020544,31.8271868 59.9266549,31.8271868 L53.2075151,31.8271868 C52.5321156,31.8271868 51.9845192,31.2801374 51.9845192,30.6054126 C51.9845192,29.9306267 52.5321156,29.3836384 53.2075151,29.3836384 L59.9266549,29.3836384 C60.6020544,29.3836384 61.1496508,29.9306267 61.1496508,30.6054126" id="Fill-13"></path>
<path d="M-2.4459919e-05,30.6056508 C-2.4459919e-05,29.930865 0.547571977,29.3838767 1.22297149,29.3838767 L7.94211125,29.3838767 C8.61751076,29.3838767 9.1651072,29.930865 9.1651072,30.6056508 C9.1651072,31.2803756 8.61751076,31.827425 7.94211125,31.827425 L1.22297149,31.827425 C0.547571977,31.827425 -2.4459919e-05,31.2803756 -2.4459919e-05,30.6056508" id="Fill-16"></path>
<path d="M1.04859673,38.5114766 C0.873769457,37.8596601 1.26096998,37.1897002 1.91337717,37.0151087 L8.40344978,35.2778069 C9.05591812,35.1031543 9.72654795,35.489968 9.90131407,36.1417234 C10.0762025,36.79354 9.68900198,37.4634998 9.03659479,37.6380914 L2.54639987,39.3753932 C1.89399268,39.5500458 1.22336285,39.1632321 1.04859673,38.5114766" id="Fill-19"></path>
<path d="M4.10501649,45.8469538 C3.76728615,45.2626403 3.96767404,44.5154032 4.552633,44.1780103 L10.3715866,40.8217966 C10.9564844,40.4844648 11.7044687,40.6846525 12.0421991,41.2690271 C12.3798682,41.8534017 12.1794804,42.6005777 11.5945825,42.9380317 L5.77562896,46.2941843 C5.19066999,46.6315772 4.44268567,46.4313284 4.10501649,45.8469538" id="Fill-21"></path>
<path d="M30.574697,0.0610581645 C31.2501577,0.0610581645 31.7976929,0.608046464 31.7976929,1.28283234 L31.7976929,7.99519858 C31.7976929,8.66998446 31.2501577,9.21697276 30.574697,9.21697276 C29.8992363,9.21697276 29.351701,8.66998446 29.351701,7.99519858 L29.351701,1.28283234 C29.351701,0.608046464 29.8992363,0.0610581645 30.574697,0.0610581645" id="Fill-23"></path>
<path d="M8.97567736,9.02794597 C9.45331843,8.55078206 10.2276583,8.55078206 10.7052382,9.02794597 L15.4563329,13.7742943 C15.933974,14.2514582 15.933974,15.0250245 15.4563329,15.5021273 C14.978753,15.9792912 14.2044131,15.9792912 13.726772,15.5021273 L8.97567736,10.755779 C8.49803629,10.2786762 8.49803629,9.50510987 8.97567736,9.02794597" id="Fill-25"></path>
<path d="M4.09247466,15.3311767 C4.43014384,14.7468021 5.17818932,14.5465533 5.76308713,14.8839463 L11.5820407,18.2401599 C12.1669385,18.5775529 12.3673876,19.3247899 12.0296572,19.9091034 C11.6919269,20.493478 10.9439426,20.6937268 10.3590448,20.3563339 L4.54009118,17.0001202 C3.95519337,16.6627273 3.75480548,15.9154902 4.09247466,15.3311767" id="Fill-27"></path>
<path d="M1.05988498,22.6906678 C1.23471225,22.0389124 1.90528093,21.6520987 2.55774927,21.8267513 L9.04788304,23.5640531 C9.70035138,23.7387057 10.0874907,24.4086656 9.91266348,25.060421 C9.7378362,25.7121765 9.06720637,26.0989291 8.41479918,25.9243376 L1.92472657,24.1870358 C1.27225823,24.0123831 0.88511886,23.3424233 1.05988498,22.6906678" id="Fill-29"></path>
<path d="M60.1010296,22.6993791 C60.2758569,23.3511345 59.8886564,24.0210944 59.2362492,24.195747 L52.7461766,25.9330488 C52.0937082,26.1076403 51.4230784,25.7208877 51.2483123,25.0691323 C51.0734239,24.4173769 51.4606244,23.747417 52.1130316,23.5727644 L58.6032265,21.8354626 C59.2556337,21.66081 59.9262635,22.0476237 60.1010296,22.6993791" id="Fill-31"></path>
<path d="M57.044616,15.3638714 C57.3823463,15.948246 57.1819584,16.695483 56.5969995,17.0328149 L50.7780459,20.3890286 C50.1931481,20.7264215 49.4452249,20.5261727 49.1074334,19.9417981 C48.7697642,19.3574846 48.9701521,18.6102475 49.5550499,18.2728546 L55.3740035,14.916702 C55.9589625,14.5793091 56.7069468,14.7794968 57.044616,15.3638714" id="Fill-33"></path>
<path d="M52.1737717,9.02776881 C52.6514127,9.50493272 52.6514127,10.278499 52.1737717,10.7556019 L47.422677,15.5019502 C46.9450359,15.9791141 46.170696,15.9791141 45.6931161,15.5019502 C45.215475,15.0248474 45.215475,14.25122 45.6931161,13.7741171 L50.4442108,9.02776881 C50.9217907,8.55060491 51.6961306,8.55060491 52.1737717,9.02776881" id="Fill-35"></path>
<path d="M45.8642316,4.14943833 C46.4491906,4.48683127 46.6496396,5.23406836 46.3119093,5.81838186 L42.9523394,11.6315223 C42.614609,12.2158358 41.8666859,12.4160846 41.2817269,12.0786917 C40.6967679,11.7412987 40.4963801,10.9940616 40.8340492,10.4097481 L44.1936191,4.59660768 C44.5313495,4.01229418 45.2793338,3.81204539 45.8642316,4.14943833" id="Fill-37"></path>
<path d="M38.4973565,1.11987821 C39.1498248,1.29453083 39.5369642,1.9644907 39.3621981,2.61624613 L37.623159,9.09989625 C37.4483317,9.75165168 36.7777019,10.1384654 36.1252947,9.96381277 C35.4728264,9.78922124 35.085687,9.11926137 35.2604531,8.46744485 L36.9995533,1.98379473 C37.1743195,1.3320393 37.8449493,0.945225592 38.4973565,1.11987821" id="Fill-39"></path>
<path d="M22.6609898,1.1085768 C23.313397,0.933924181 23.9840268,1.32073789 24.158793,1.97249332 L25.8978932,8.45614344 C26.0726593,9.10795996 25.68552,9.77785874 25.0330516,9.95251136 C24.3806444,10.127164 23.7100146,9.74035027 23.5351873,9.08859484 L21.7961482,2.60494472 C21.6213821,1.95318929 22.0085215,1.28322942 22.6609898,1.1085768" id="Fill-49"></path>
<path d="M15.3181221,4.16193708 C15.9030199,3.82460523 16.6510654,4.02479293 16.9887346,4.60916752 L20.3483045,10.4222469 C20.6860348,11.0065604 20.4856469,11.7537975 19.9006268,12.0911904 C19.315729,12.4285833 18.5677447,12.2283346 18.2300143,11.6440211 L14.8705056,5.8309417 C14.5327141,5.24656711 14.7332243,4.49933002 15.3181221,4.16193708" id="Fill-51"></path>
<path d="M8.97586081,52.1831236 C8.49821974,51.7059597 8.49821974,50.9323323 8.97586081,50.4552905 L13.7269555,45.7089422 C14.2045965,45.2317783 14.9789364,45.2317783 15.4565164,45.7089422 C15.9341574,46.186045 15.9341574,46.9596113 15.4565164,47.4367753 L10.7054217,52.1831236 C10.2278418,52.6602875 9.45350188,52.6602875 8.97586081,52.1831236" id="Fill-53"></path>
<path d="M15.2853948,57.0613869 C14.7004358,56.724055 14.4999868,55.9768179 14.8377782,55.3924433 L18.197287,49.5793029 C18.5350173,48.9949894 19.2829405,48.7948017 19.8678994,49.1321335 C20.4528584,49.4695876 20.6532463,50.2167636 20.3155771,50.8010771 L16.9560072,56.6142175 C16.618338,57.1985921 15.8702926,57.3987798 15.2853948,57.0613869" id="Fill-65"></path>
<path d="M22.652276,60.090947 C21.9998076,59.9163555 21.6126683,59.2463956 21.7874344,58.5946401 L23.5264735,52.1109289 C23.7013008,51.4591735 24.3719306,51.0723598 25.0243378,51.2470735 C25.6768061,51.421665 26.0639455,52.0916249 25.8891794,52.7433803 L24.1500791,59.2270305 C23.975313,59.8787859 23.3046832,60.2655996 22.652276,60.090947" id="Fill-73"></path>
</g>
<g id="Group" transform="translate(12.068571, 12.068571)" fill="#FF6900">
<path d="M18.506364,36.2688224 C17.8309034,36.2688224 17.2833681,35.7218341 17.2833681,35.0470483 L17.2833681,31.3817257 C17.2833681,30.7069399 17.8309034,30.1599516 18.506364,30.1599516 C19.1818247,30.1599516 19.72936,30.7069399 19.72936,31.3817257 L19.72936,35.0470483 C19.72936,35.7218341 19.1818247,36.2688224 18.506364,36.2688224" id="Fill-41"></path>
<path d="M30.1263727,18.5120575 C30.1263727,17.8372716 30.673908,17.2902833 31.3493686,17.2902833 L35.0183565,17.2902833 C35.6938171,17.2902833 36.2413524,17.8372716 36.2413524,18.5120575 C36.2413524,19.1868434 35.6938171,19.7338317 35.0183565,19.7338317 L31.3493686,19.7338317 C30.673908,19.7338317 30.1263727,19.1868434 30.1263727,18.5120575" id="Fill-43"></path>
<path d="M28.560785,24.3360045 C28.8984542,23.7516299 29.6464996,23.5513811 30.2313975,23.8888352 L33.4088632,25.7214964 C33.9938222,26.0588283 34.1942101,26.8060654 33.8565409,27.39044 C33.5187494,27.9747535 32.7708262,28.1750022 32.1858673,27.8376093 L29.0084015,26.004948 C28.4235037,25.6676162 28.2230547,24.920318 28.560785,24.3360045" id="Fill-45"></path>
<path d="M24.3010228,28.6082189 C24.8859818,28.2708871 25.6339661,28.4710748 25.9716964,29.0553883 L27.8061904,32.2296798 C28.1439207,32.8140544 27.9434717,33.5612915 27.3585127,33.8986844 C26.7736149,34.2360773 26.0256306,34.0358285 25.6879002,33.451454 L23.8534063,30.2771625 C23.515676,29.692849 23.716125,28.9456119 24.3010228,28.6082189" id="Fill-47"></path>
<path d="M18.4956139,0.816643903 C19.1710746,0.816643903 19.7186099,1.3636322 19.7186099,2.03841808 L19.7186099,5.70374061 C19.7186099,6.3784654 19.1710746,6.92551479 18.4956139,6.92551479 C17.8201532,6.92551479 17.272618,6.3784654 17.272618,5.70374061 L17.272618,2.03841808 C17.272618,1.3636322 17.8201532,0.816643903 18.4956139,0.816643903" id="Fill-55"></path>
<path d="M8.44118686,12.7494618 C8.10351768,13.3338364 7.35547221,13.5340852 6.77057439,13.1966923 L3.59310861,11.364031 C3.00814965,11.0266381 2.80776176,10.279401 3.14543094,9.69502639 C3.48316127,9.11071289 4.2311456,8.9104641 4.81610456,9.24785704 L7.99357034,11.0805183 C8.57846816,11.4179112 8.77885604,12.1651483 8.44118686,12.7494618" id="Fill-57"></path>
<path d="M12.700894,8.47724741 C12.1159962,8.81464035 11.3680119,8.61439156 11.0302815,8.03001697 L9.19578759,4.85578657 C8.85805726,4.27141198 9.0585063,3.5241749 9.64340411,3.18678196 C10.2283631,2.84945011 10.9763474,3.04963781 11.3140777,3.63401239 L13.1485717,6.8082428 C13.486302,7.39261738 13.285853,8.13985447 12.700894,8.47724741" id="Fill-59"></path>
<path d="M24.2842983,8.48953846 L24.2842372,8.48953846 C23.6993394,8.15214552 23.4988903,7.40496952 23.8366207,6.82059493 L25.6711146,3.64630344 C26.0088449,3.06192885 26.7568293,2.86174115 27.3417271,3.199073 L27.3417882,3.199073 C27.926686,3.53646594 28.1271351,4.28370303 27.7894047,4.86807762 L25.9549108,8.04236911 C25.6171805,8.6267437 24.8691962,8.8269314 24.2842983,8.48953846" id="Fill-61"></path>
<path d="M28.560785,12.7450207 C28.2230547,12.1606461 28.4235037,11.413409 29.0084015,11.0760772 L32.1858673,9.2433548 C32.7708262,8.90602295 33.5187494,9.10621065 33.8565409,9.69058524 C34.1942101,10.2749598 33.9938222,11.0221358 33.4088632,11.3595288 L30.2313975,13.19219 C29.6464996,13.529583 28.8984542,13.3293953 28.560785,12.7450207" id="Fill-63"></path>
<path d="M0.772922751,18.5515452 C0.772922751,17.8768204 1.32045804,17.329771 1.9959187,17.329771 L5.66490656,17.329771 C6.34036722,17.329771 6.88790251,17.8768204 6.88790251,18.5515452 C6.88790251,19.2263311 6.34036722,19.7733194 5.66490656,19.7733194 L1.9959187,19.7733194 C1.32045804,19.7733194 0.772922751,19.2263311 0.772922751,18.5515452" id="Fill-67"></path>
<path d="M12.7176735,28.5959279 C13.3026325,28.9332597 13.5030815,29.6805579 13.16529,30.2648714 L11.3307961,33.4391629 C10.9931269,34.0235375 10.2451426,34.2237252 9.66018362,33.8863933 C9.0752858,33.5490004 8.87483677,32.8017633 9.2125671,32.2173887 L11.047061,29.0430972 C11.3847302,28.4587837 12.1327757,28.258596 12.7176735,28.5959279" id="Fill-69"></path>
<path d="M8.44118686,24.3404762 C8.77885604,24.9247897 8.57846816,25.6720268 7.99357034,26.0094197 L4.81610456,27.842081 C4.2311456,28.1794739 3.48316127,27.9792252 3.14543094,27.3949117 C2.80776176,26.8105371 3.00814965,26.0633 3.59310861,25.725907 L6.77057439,23.8932458 C7.35547221,23.5558528 8.10351768,23.7561016 8.44118686,24.3404762" id="Fill-71"></path>
</g>
</g>
</g>
</svg>
</div>
And the SCSS code is here:
* {
margin: 0;
padding: 0;
}
.loading-screen {
height: 100vh;
width: 100vw;
background-color: #f3f4f5;
position: fixed;
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
g#Group-75-Copy {
transform-origin: center;
animation: backwards-spin 3s infinite linear;
}
g#Group {
transform-origin: center;
transform-box: fill-box;
animation: spin 3s infinite linear;
}
}
#keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
#keyframes backwards-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}
And here's a link to a working codepen: https://codepen.io/adammcgurk/pen/oJmLxW
So the TL;DR question is:
How can I get the orange circle to be in the middle as opposed to in the top left corner of the SVG?
I would add some translation to the animation to rectify the position:
* {
margin: 0;
padding: 0;
}
.loading-screen {
height: 100vh;
width: 100vw;
background-color: #f3f4f5;
position: fixed;
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
svg {
width: 62px;
height: 62px;
}
g#Group-75-Copy {
transform-origin: center;
animation: backwards-spin 3s infinite linear;
}
g#Group {
transform-origin: center;
transform-box:fill-box;
animation: spin 3s infinite linear;
}
#keyframes spin {
0% {
transform:translate(35%,35%) rotate(0deg);
}
100% {
transform:translate(35%,35%) rotate(360deg);
}
}
#keyframes backwards-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}
<div class='loading-screen'>
<svg>
<g id="Page-1" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group-11-Copy-9">
<g id="Group-75-Copy" fill="#425563">
<path d="M30.5749355,61.1497976 C29.8994748,61.1497976 29.3519395,60.6028093 29.3519395,59.9280234 L29.3519395,53.2156572 C29.3519395,52.5408713 29.8994748,51.993883 30.5749355,51.993883 C31.2503961,51.993883 31.7979314,52.5408713 31.7979314,53.2156572 L31.7979314,59.9280234 C31.7979314,60.6028093 31.2503961,61.1497976 30.5749355,61.1497976" id="Fill-1"></path>
<path d="M38.4886365,60.1022789 C37.8362293,60.2768705 37.1655995,59.8901178 36.9908334,59.2383013 L35.2517331,52.7547123 C35.076967,52.1029569 35.4641064,51.432997 36.1165747,51.2583444 C36.7689819,51.0836918 37.4396118,51.4704444 37.614439,52.1222609 L39.3534781,58.605911 C39.5282442,59.2576664 39.1411049,59.9276263 38.4886365,60.1022789" id="Fill-3"></path>
<path d="M45.8315103,57.0489187 C45.2466125,57.3862505 44.498567,57.1860628 44.1608979,56.6017493 L40.801328,50.7886089 C40.4635977,50.2042343 40.6640467,49.4570583 41.2490057,49.1196042 C41.8339035,48.7822724 42.5818878,48.9824601 42.9196181,49.5668347 L46.2791269,55.3799751 C46.6169183,55.9642886 46.4164081,56.7115257 45.8315103,57.0489187" id="Fill-5"></path>
<path d="M52.173949,52.1828792 C51.6963079,52.6600431 50.921968,52.6600431 50.4443881,52.1828792 L45.6932934,47.4365309 C45.2156524,46.959367 45.2156524,46.1858007 45.6932934,45.7086979 C46.1708734,45.231534 46.9452133,45.231534 47.4228543,45.7086979 L52.173949,50.4550462 C52.6515901,50.932149 52.6515901,51.7057153 52.173949,52.1828792" id="Fill-7"></path>
<path d="M57.0571517,45.8797096 C56.7194825,46.4640231 55.971437,46.6642719 55.3865392,46.3268789 L49.5675856,42.9707264 C48.9826878,42.6332723 48.7822388,41.8860963 49.1199691,41.3017828 C49.4576994,40.7173472 50.2056838,40.5171595 50.7905816,40.8544913 L56.6095352,44.210705 C57.194433,44.5480979 57.3948209,45.295335 57.0571517,45.8797096" id="Fill-9"></path>
<path d="M60.0897414,38.5201879 C59.9149141,39.1719433 59.2443454,39.558757 58.5918771,39.3841044 L52.1017433,37.6468026 C51.4493361,37.4722111 51.0621356,36.8022512 51.2369629,36.1504347 C51.4117901,35.4986793 52.08242,35.1118656 52.7348272,35.2865182 L59.2248998,37.02382 C59.8773681,37.1984115 60.2645075,37.8683714 60.0897414,38.5201879" id="Fill-11"></path>
<path d="M61.1496508,30.6054126 C61.1496508,31.2801374 60.6020544,31.8271868 59.9266549,31.8271868 L53.2075151,31.8271868 C52.5321156,31.8271868 51.9845192,31.2801374 51.9845192,30.6054126 C51.9845192,29.9306267 52.5321156,29.3836384 53.2075151,29.3836384 L59.9266549,29.3836384 C60.6020544,29.3836384 61.1496508,29.9306267 61.1496508,30.6054126" id="Fill-13"></path>
<path d="M-2.4459919e-05,30.6056508 C-2.4459919e-05,29.930865 0.547571977,29.3838767 1.22297149,29.3838767 L7.94211125,29.3838767 C8.61751076,29.3838767 9.1651072,29.930865 9.1651072,30.6056508 C9.1651072,31.2803756 8.61751076,31.827425 7.94211125,31.827425 L1.22297149,31.827425 C0.547571977,31.827425 -2.4459919e-05,31.2803756 -2.4459919e-05,30.6056508" id="Fill-16"></path>
<path d="M1.04859673,38.5114766 C0.873769457,37.8596601 1.26096998,37.1897002 1.91337717,37.0151087 L8.40344978,35.2778069 C9.05591812,35.1031543 9.72654795,35.489968 9.90131407,36.1417234 C10.0762025,36.79354 9.68900198,37.4634998 9.03659479,37.6380914 L2.54639987,39.3753932 C1.89399268,39.5500458 1.22336285,39.1632321 1.04859673,38.5114766" id="Fill-19"></path>
<path d="M4.10501649,45.8469538 C3.76728615,45.2626403 3.96767404,44.5154032 4.552633,44.1780103 L10.3715866,40.8217966 C10.9564844,40.4844648 11.7044687,40.6846525 12.0421991,41.2690271 C12.3798682,41.8534017 12.1794804,42.6005777 11.5945825,42.9380317 L5.77562896,46.2941843 C5.19066999,46.6315772 4.44268567,46.4313284 4.10501649,45.8469538" id="Fill-21"></path>
<path d="M30.574697,0.0610581645 C31.2501577,0.0610581645 31.7976929,0.608046464 31.7976929,1.28283234 L31.7976929,7.99519858 C31.7976929,8.66998446 31.2501577,9.21697276 30.574697,9.21697276 C29.8992363,9.21697276 29.351701,8.66998446 29.351701,7.99519858 L29.351701,1.28283234 C29.351701,0.608046464 29.8992363,0.0610581645 30.574697,0.0610581645" id="Fill-23"></path>
<path d="M8.97567736,9.02794597 C9.45331843,8.55078206 10.2276583,8.55078206 10.7052382,9.02794597 L15.4563329,13.7742943 C15.933974,14.2514582 15.933974,15.0250245 15.4563329,15.5021273 C14.978753,15.9792912 14.2044131,15.9792912 13.726772,15.5021273 L8.97567736,10.755779 C8.49803629,10.2786762 8.49803629,9.50510987 8.97567736,9.02794597" id="Fill-25"></path>
<path d="M4.09247466,15.3311767 C4.43014384,14.7468021 5.17818932,14.5465533 5.76308713,14.8839463 L11.5820407,18.2401599 C12.1669385,18.5775529 12.3673876,19.3247899 12.0296572,19.9091034 C11.6919269,20.493478 10.9439426,20.6937268 10.3590448,20.3563339 L4.54009118,17.0001202 C3.95519337,16.6627273 3.75480548,15.9154902 4.09247466,15.3311767" id="Fill-27"></path>
<path d="M1.05988498,22.6906678 C1.23471225,22.0389124 1.90528093,21.6520987 2.55774927,21.8267513 L9.04788304,23.5640531 C9.70035138,23.7387057 10.0874907,24.4086656 9.91266348,25.060421 C9.7378362,25.7121765 9.06720637,26.0989291 8.41479918,25.9243376 L1.92472657,24.1870358 C1.27225823,24.0123831 0.88511886,23.3424233 1.05988498,22.6906678" id="Fill-29"></path>
<path d="M60.1010296,22.6993791 C60.2758569,23.3511345 59.8886564,24.0210944 59.2362492,24.195747 L52.7461766,25.9330488 C52.0937082,26.1076403 51.4230784,25.7208877 51.2483123,25.0691323 C51.0734239,24.4173769 51.4606244,23.747417 52.1130316,23.5727644 L58.6032265,21.8354626 C59.2556337,21.66081 59.9262635,22.0476237 60.1010296,22.6993791" id="Fill-31"></path>
<path d="M57.044616,15.3638714 C57.3823463,15.948246 57.1819584,16.695483 56.5969995,17.0328149 L50.7780459,20.3890286 C50.1931481,20.7264215 49.4452249,20.5261727 49.1074334,19.9417981 C48.7697642,19.3574846 48.9701521,18.6102475 49.5550499,18.2728546 L55.3740035,14.916702 C55.9589625,14.5793091 56.7069468,14.7794968 57.044616,15.3638714" id="Fill-33"></path>
<path d="M52.1737717,9.02776881 C52.6514127,9.50493272 52.6514127,10.278499 52.1737717,10.7556019 L47.422677,15.5019502 C46.9450359,15.9791141 46.170696,15.9791141 45.6931161,15.5019502 C45.215475,15.0248474 45.215475,14.25122 45.6931161,13.7741171 L50.4442108,9.02776881 C50.9217907,8.55060491 51.6961306,8.55060491 52.1737717,9.02776881" id="Fill-35"></path>
<path d="M45.8642316,4.14943833 C46.4491906,4.48683127 46.6496396,5.23406836 46.3119093,5.81838186 L42.9523394,11.6315223 C42.614609,12.2158358 41.8666859,12.4160846 41.2817269,12.0786917 C40.6967679,11.7412987 40.4963801,10.9940616 40.8340492,10.4097481 L44.1936191,4.59660768 C44.5313495,4.01229418 45.2793338,3.81204539 45.8642316,4.14943833" id="Fill-37"></path>
<path d="M38.4973565,1.11987821 C39.1498248,1.29453083 39.5369642,1.9644907 39.3621981,2.61624613 L37.623159,9.09989625 C37.4483317,9.75165168 36.7777019,10.1384654 36.1252947,9.96381277 C35.4728264,9.78922124 35.085687,9.11926137 35.2604531,8.46744485 L36.9995533,1.98379473 C37.1743195,1.3320393 37.8449493,0.945225592 38.4973565,1.11987821" id="Fill-39"></path>
<path d="M22.6609898,1.1085768 C23.313397,0.933924181 23.9840268,1.32073789 24.158793,1.97249332 L25.8978932,8.45614344 C26.0726593,9.10795996 25.68552,9.77785874 25.0330516,9.95251136 C24.3806444,10.127164 23.7100146,9.74035027 23.5351873,9.08859484 L21.7961482,2.60494472 C21.6213821,1.95318929 22.0085215,1.28322942 22.6609898,1.1085768" id="Fill-49"></path>
<path d="M15.3181221,4.16193708 C15.9030199,3.82460523 16.6510654,4.02479293 16.9887346,4.60916752 L20.3483045,10.4222469 C20.6860348,11.0065604 20.4856469,11.7537975 19.9006268,12.0911904 C19.315729,12.4285833 18.5677447,12.2283346 18.2300143,11.6440211 L14.8705056,5.8309417 C14.5327141,5.24656711 14.7332243,4.49933002 15.3181221,4.16193708" id="Fill-51"></path>
<path d="M8.97586081,52.1831236 C8.49821974,51.7059597 8.49821974,50.9323323 8.97586081,50.4552905 L13.7269555,45.7089422 C14.2045965,45.2317783 14.9789364,45.2317783 15.4565164,45.7089422 C15.9341574,46.186045 15.9341574,46.9596113 15.4565164,47.4367753 L10.7054217,52.1831236 C10.2278418,52.6602875 9.45350188,52.6602875 8.97586081,52.1831236" id="Fill-53"></path>
<path d="M15.2853948,57.0613869 C14.7004358,56.724055 14.4999868,55.9768179 14.8377782,55.3924433 L18.197287,49.5793029 C18.5350173,48.9949894 19.2829405,48.7948017 19.8678994,49.1321335 C20.4528584,49.4695876 20.6532463,50.2167636 20.3155771,50.8010771 L16.9560072,56.6142175 C16.618338,57.1985921 15.8702926,57.3987798 15.2853948,57.0613869" id="Fill-65"></path>
<path d="M22.652276,60.090947 C21.9998076,59.9163555 21.6126683,59.2463956 21.7874344,58.5946401 L23.5264735,52.1109289 C23.7013008,51.4591735 24.3719306,51.0723598 25.0243378,51.2470735 C25.6768061,51.421665 26.0639455,52.0916249 25.8891794,52.7433803 L24.1500791,59.2270305 C23.975313,59.8787859 23.3046832,60.2655996 22.652276,60.090947" id="Fill-73"></path>
</g>
<g id="Group" fill="#FF6900">
<path d="M18.506364,36.2688224 C17.8309034,36.2688224 17.2833681,35.7218341 17.2833681,35.0470483 L17.2833681,31.3817257 C17.2833681,30.7069399 17.8309034,30.1599516 18.506364,30.1599516 C19.1818247,30.1599516 19.72936,30.7069399 19.72936,31.3817257 L19.72936,35.0470483 C19.72936,35.7218341 19.1818247,36.2688224 18.506364,36.2688224" id="Fill-41"></path>
<path d="M30.1263727,18.5120575 C30.1263727,17.8372716 30.673908,17.2902833 31.3493686,17.2902833 L35.0183565,17.2902833 C35.6938171,17.2902833 36.2413524,17.8372716 36.2413524,18.5120575 C36.2413524,19.1868434 35.6938171,19.7338317 35.0183565,19.7338317 L31.3493686,19.7338317 C30.673908,19.7338317 30.1263727,19.1868434 30.1263727,18.5120575" id="Fill-43"></path>
<path d="M28.560785,24.3360045 C28.8984542,23.7516299 29.6464996,23.5513811 30.2313975,23.8888352 L33.4088632,25.7214964 C33.9938222,26.0588283 34.1942101,26.8060654 33.8565409,27.39044 C33.5187494,27.9747535 32.7708262,28.1750022 32.1858673,27.8376093 L29.0084015,26.004948 C28.4235037,25.6676162 28.2230547,24.920318 28.560785,24.3360045" id="Fill-45"></path>
<path d="M24.3010228,28.6082189 C24.8859818,28.2708871 25.6339661,28.4710748 25.9716964,29.0553883 L27.8061904,32.2296798 C28.1439207,32.8140544 27.9434717,33.5612915 27.3585127,33.8986844 C26.7736149,34.2360773 26.0256306,34.0358285 25.6879002,33.451454 L23.8534063,30.2771625 C23.515676,29.692849 23.716125,28.9456119 24.3010228,28.6082189" id="Fill-47"></path>
<path d="M18.4956139,0.816643903 C19.1710746,0.816643903 19.7186099,1.3636322 19.7186099,2.03841808 L19.7186099,5.70374061 C19.7186099,6.3784654 19.1710746,6.92551479 18.4956139,6.92551479 C17.8201532,6.92551479 17.272618,6.3784654 17.272618,5.70374061 L17.272618,2.03841808 C17.272618,1.3636322 17.8201532,0.816643903 18.4956139,0.816643903" id="Fill-55"></path>
<path d="M8.44118686,12.7494618 C8.10351768,13.3338364 7.35547221,13.5340852 6.77057439,13.1966923 L3.59310861,11.364031 C3.00814965,11.0266381 2.80776176,10.279401 3.14543094,9.69502639 C3.48316127,9.11071289 4.2311456,8.9104641 4.81610456,9.24785704 L7.99357034,11.0805183 C8.57846816,11.4179112 8.77885604,12.1651483 8.44118686,12.7494618" id="Fill-57"></path>
<path d="M12.700894,8.47724741 C12.1159962,8.81464035 11.3680119,8.61439156 11.0302815,8.03001697 L9.19578759,4.85578657 C8.85805726,4.27141198 9.0585063,3.5241749 9.64340411,3.18678196 C10.2283631,2.84945011 10.9763474,3.04963781 11.3140777,3.63401239 L13.1485717,6.8082428 C13.486302,7.39261738 13.285853,8.13985447 12.700894,8.47724741" id="Fill-59"></path>
<path d="M24.2842983,8.48953846 L24.2842372,8.48953846 C23.6993394,8.15214552 23.4988903,7.40496952 23.8366207,6.82059493 L25.6711146,3.64630344 C26.0088449,3.06192885 26.7568293,2.86174115 27.3417271,3.199073 L27.3417882,3.199073 C27.926686,3.53646594 28.1271351,4.28370303 27.7894047,4.86807762 L25.9549108,8.04236911 C25.6171805,8.6267437 24.8691962,8.8269314 24.2842983,8.48953846" id="Fill-61"></path>
<path d="M28.560785,12.7450207 C28.2230547,12.1606461 28.4235037,11.413409 29.0084015,11.0760772 L32.1858673,9.2433548 C32.7708262,8.90602295 33.5187494,9.10621065 33.8565409,9.69058524 C34.1942101,10.2749598 33.9938222,11.0221358 33.4088632,11.3595288 L30.2313975,13.19219 C29.6464996,13.529583 28.8984542,13.3293953 28.560785,12.7450207" id="Fill-63"></path>
<path d="M0.772922751,18.5515452 C0.772922751,17.8768204 1.32045804,17.329771 1.9959187,17.329771 L5.66490656,17.329771 C6.34036722,17.329771 6.88790251,17.8768204 6.88790251,18.5515452 C6.88790251,19.2263311 6.34036722,19.7733194 5.66490656,19.7733194 L1.9959187,19.7733194 C1.32045804,19.7733194 0.772922751,19.2263311 0.772922751,18.5515452" id="Fill-67"></path>
<path d="M12.7176735,28.5959279 C13.3026325,28.9332597 13.5030815,29.6805579 13.16529,30.2648714 L11.3307961,33.4391629 C10.9931269,34.0235375 10.2451426,34.2237252 9.66018362,33.8863933 C9.0752858,33.5490004 8.87483677,32.8017633 9.2125671,32.2173887 L11.047061,29.0430972 C11.3847302,28.4587837 12.1327757,28.258596 12.7176735,28.5959279" id="Fill-69"></path>
<path d="M8.44118686,24.3404762 C8.77885604,24.9247897 8.57846816,25.6720268 7.99357034,26.0094197 L4.81610456,27.842081 C4.2311456,28.1794739 3.48316127,27.9792252 3.14543094,27.3949117 C2.80776176,26.8105371 3.00814965,26.0633 3.59310861,25.725907 L6.77057439,23.8932458 C7.35547221,23.5558528 8.10351768,23.7561016 8.44118686,24.3404762" id="Fill-71"></path>
</g>
</g>
</g>
</svg>
</div>
Pure svg and smil
Option using stroke-dasharray
We divide one circle into 12 parts, the second circle into 24 parts.
Set the circles to a wide stroke.
Use the animation of the rotation of circles in different directions
.container {
width:50%;
height:50%;
}
<div class="container">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 400 400" preserveAspectRatio="xMinYMin meet" >
<circle fill="none" cx="200" cy="200" r="50" stroke="#425563" stroke-width="14" stroke-dasharray="4 9.08" >
<animateTransform
attributeName="transform"
type="rotate"
dur="2s"
values="0 200 200; -360 200 200"
repeatCount="indefinite" />
</circle>
<circle fill="none" cx="200" cy="200" r="25" stroke="#FF6900" stroke-width="12" stroke-dasharray="4 9.08" >
<animateTransform
attributeName="transform"
type="rotate"
dur="2s"
values="0 200 200; 360 200 200"
repeatCount="indefinite" />
</circle>
</svg>
</div>