Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="loader">
<svg class="loader__overlay" width="1452" height="798" viewBox="0 0 1452 798" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1="45.49%" y1="52.11%" x2="25.49%" y2="28.2%" id="a"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="45.49%" y1="52.29%" x2="25.49%" y2="26.33%" id="b"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="45.49%" y1="52.01%" x2="25.49%" y2="29.19%" id="c"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="45.49%" y1="51.95%" x2="25.49%" y2="29.83%" id="d"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="35.42%" y1="53.21%" x2="25.49%" y2="35.69%" id="e"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="45.49%" y1="51.75%" x2="33.78%" y2="19.45%" id="f"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="53.22%" y1="42.94%" x2="37.32%" y2="24.33%" id="g"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="32.3%" y1="57.3%" x2="25.49%" y2="39.58%" id="h"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="33.32%" y1="54.86%" x2="28.19%" y2="43.9%" id="i"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="32.3%" y1="62.83%" x2="25.49%" y2="31.67%" id="j"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="32.3%" y1="57.54%" x2="25.49%" y2="39.22%" id="k"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="40.72%" y1="50%" x2="36.71%" y2="36.42%" id="l"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="32.3%" y1="58.78%" x2="25.49%" y2="37.45%" id="m"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="32.3%" y1="58.63%" x2="25.49%" y2="37.67%" id="n"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="38.41%" y1="55.35%" x2="32.79%" y2="45.58%" id="o"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="47.18%" y1="52.81%" x2="50%" y2="35.7%" id="p"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="41.56%" y1="56.38%" x2="50%" y2="41.46%" id="q"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="78.23%" y1="50%" x2="40.88%" y2="29.33%" id="r"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="52.91%" y1="54.78%" x2="36.71%" y2="47.33%" id="s"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="32.3%" y1="62.72%" x2="25.49%" y2="31.82%" id="t"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient><linearGradient x1="40.72%" y1="50%" x2="36.71%" y2="36.26%" id="u"><stop stop-color="#54428E" stop-opacity="0" offset="0%"/><stop stop-color="#54428E" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M165.55 281.03l-15.86 19.7-3.33 12.03-2.57 13.2c14.37 3.46 24.73 2.65 31.08-2.42 6.35-5.06 13-17.83 19.95-38.3l-29.27-4.2z" fill="url(#a)"/><path d="M146.36 228l-14.82 18.63-3.97 15.07-2.57 13.2c14.37 3.45 24.73 2.65 31.08-2.42 6.35-5.07 13-17.83 19.95-38.3L146.36 228z" fill="url(#b)" transform="rotate(180 150.51 252.5)"/><path d="M279.55 489.03l-15.86 19.7-3.33 12.03-2.57 13.2c14.37 3.46 24.73 2.65 31.08-2.42 6.35-5.06 13-17.83 19.95-38.3l-29.27-4.2z" fill="url(#a)"/><path d="M251.69 441l-10.4 14.48-4.72 16.17-2.57 13.2c14.37 3.46 24.73 2.65 31.08-2.42 6.35-5.06 13-17.83 19.95-38.3L251.69 441z" fill="url(#c)" transform="rotate(180 259.51 463.98)"/><path d="M81.61 27.53L69.34 41.57l-3.22 15.9-2.57 13.2c14.37 3.45 24.73 2.64 31.08-2.42 6.35-5.07 13-17.83 19.95-38.3L81.6 27.53z" fill="url(#d)" transform="rotate(30 -360.23 969.99)"/><path d="M32.78 15.54L16.06 30.78l-10.65 12L15 58.72c14.36 3.45 24.73 2.64 31.08-2.42 6.35-5.07 13-17.83 19.94-38.3l-33.25-2.45z" fill="url(#e)" transform="rotate(-160 290.43 150.63)"/><path d="M65.3 25.91l-12.8 1.77-7.46 25.36-2.56 13.2c14.37 3.45 24.73 2.64 31.08-2.43 6.35-5.06 13-17.83 19.94-38.3l-28.2.4z" fill="url(#f)" transform="rotate(30 -422.77 858.81)"/><path d="M19.83 10.06L9.79 20 7.37 38.75l-2.56 13.2c14.37 3.45 24.73 2.64 31.08-2.42 6.35-5.07 6.8-20.35 1.36-45.84l-17.42 6.37z" fill="url(#g)" transform="rotate(-110 334.2 52.84)"/><path d="M89.52 63.35L68.65 77.38l-12.33 13 .35 10.19c26.6 7.9 43.07 9.31 49.42 4.24 6.35-5.06 13-17.83 19.95-38.3l-36.52-3.16z" fill="url(#h)" transform="rotate(-30 1046.22 -626.07)"/><path d="M58.37 26.23L31.4 40.37l-14.38 9.16-15.3 10.91c6.69 16 13.2 21.48 19.56 16.41 6.35-5.06 29.27-22.35 68.77-51.84l-31.68 1.22z" fill="url(#i)" transform="rotate(140 227.8 326.84)"/><path d="M72.14 63.53l-32.3 18.26-12.33 13 .34 10.19c26.6 7.9 43.08 9.31 49.43 4.24 6.35-5.06 8.82-17.77 7.43-38.13l-12.57-7.56z" fill="url(#j)" transform="rotate(-110 881.36 -127.04)"/><path d="M50.1 3.58L35.4 8.44 15.76 25.12.46 36.03c6.69 16.01 13.21 21.48 19.56 16.41C26.37 47.38 49.29 30.1 88.79.6l-38.7 2.98z" fill="url(#i)" transform="rotate(120 523.78 655.56)"/><path d="M79.56 80.05L60.12 88.9 45.9 107.82l.35 10.2c26.6 7.89 43.07 9.3 49.42 4.24 6.35-5.07 13-17.83 19.95-38.3l-36.05-3.91z" fill="url(#k)" transform="rotate(-30 1082.23 -815.73)"/><path d="M50.38 25.96l-17.7 8.07-15.9 8.05L6.16 49.5c5.41 21 11.3 28.97 17.65 23.9 5.3-4.22 30.92-4.94 54.4-28.48 3.12-3.11 2.73-12.14-1.16-27.07l-26.68 8.1z" fill="url(#l)" transform="rotate(140 283.65 342.4)"/><g><path d="M87.9 51.97l-19.78 11.9L53.89 83.3l.34 10.2c26.6 7.89 43.08 9.3 49.43 4.24 6.35-5.07 13-17.83 19.94-38.3l-35.7-7.47z" fill="url(#m)" transform="rotate(-30 1240.23 -1286.82)"/><path d="M51.3 26.63L33.63 34.7l-12.9 7L7.1 50.17c5.42 21 11.3 28.97 17.65 23.9 5.3-4.22 30.92-4.94 54.4-28.47 3.12-3.12 2.73-12.15-1.16-27.08l-26.68 8.1z" fill="url(#l)" transform="rotate(140 399.36 391.28)"/></g><g><path d="M86.8 74.95L67.1 84.88l-14.46 20.98.35 10.19c26.6 7.9 43.07 9.31 49.42 4.24 6.35-5.06 13-17.83 19.95-38.3L86.8 74.96z" fill="url(#n)" transform="rotate(-30 1388.82 -1894.19)"/><path d="M72.06 32.54l-25 8.85L23.5 57.12C5.06 64.99-3.5 70.3-2.15 73.08c3.73 7.67 39.18 11.23 43.3 7.94 5.3-4.22 30.92-4.94 54.4-28.48 3.12-3.12 2.12-10.39-3-21.81l-20.49 1.8z" fill="url(#o)" transform="rotate(140 573.72 458.94)"/></g><g><path d="M87.58 137.2l-33.93 4.75-23.32 8.67-15.23 6.45a2171.2 2171.2 0 0 0 18.21 21.08c6.07 5.44 17.96 6.55 23.91 1.8 6.35-5.07 17.59-11.56 33.7-19.47l-3.34-23.27z" fill="url(#p)" transform="rotate(-60 972.04 -810.36)"/><path d="M54.3 38.8l-29.93 9.1C4.03 53.22-5.47 57.3-4.13 60.06c3.73 7.67 46.46 28.7 50.57 25.42 5.3-4.23 30.92-4.94 54.41-28.48 3.11-3.12 2.29-10.8-2.48-23.04L54.3 38.8z" fill="url(#q)" transform="rotate(110 580.99 665.38)"/></g><g><path d="M71.93 22.94l-23.7 14.08-10.31 17.26.34 10.19c26.6 7.9 43.08 9.31 49.43 4.24 6.35-5.06 10.76-23.19 13.23-54.38l-29 8.6z" fill="url(#r)" transform="rotate(-60 846.02 -691.86)"/><path d="M-6.17 77.53l2.57 10.2c36.44.98 56.86-5.24 61.25-18.69 1.24-3.8-10-4.02-33.7-.66l-30.12 9.15z" fill="url(#s)" transform="rotate(110 432.12 594.06)"/></g><g><path d="M98.32 62.9L72.65 83.25l-15.2 20.9.34 10.2c26.6 7.9 43.08 9.31 49.43 4.25 6.35-5.07 13-17.84 19.94-38.3L98.32 62.9z" fill="url(#t)" transform="rotate(-30 1073.83 -1047.95)"/><path d="M57.4 18.43L22.9 39.12 7.24 50.42c5.42 21.01 11.3 28.98 17.65 23.91 5.3-4.22 30.92-4.94 54.4-28.48 3.12-3.11 2.73-12.14-1.16-27.07l-20.73-.35z" fill="url(#u)" transform="rotate(140 345.25 340.3)"/></g></g></svg>

<svg class="loader__lines" width="1452" height="798" viewBox="0 0 1452 798" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <linearGradient id="gradient" x1="0%" y1="0%" x2="0%" y2="100%">
      <stop offset="20%" stop-color="#65C193" />
      <stop offset="60%" stop-color="#BDFB95" />
    </linearGradient>
    <path id="loader-main" d="M41 421.35C269.66 157.12 349.88 25 281.64 25 179.3 25 88.4 535.28 193.6 535.28s151.08-210.6 132.1-210.6c-18.99 0-110.43 210.6 0 210.6s99.7-210.6 53.32-210.6c-46.37 0 19.95 56.4 64.18 56.4 44.23 0 148.32-56.4 100.29-56.4-48.03 0-160.16 210.6-75.56 210.6s135.53-210.6 112.1-210.6c-23.4 0-42.26 197.62 8.27 197.62s154.72-207.32 131.8-207.32c-22.91 0-117.27 201.65-24 201.65C789.4 516.63 874.72 25 852.3 25c-22.43 0-132.02 497.3-34.23 497.3 97.79 0 138.78-223.35 120.9-223.35-17.87 0-58.04 217.68-11.27 217.68 46.77 0 108.28-208.68 134.44-208.68 26.17 0 0 206.96-23.97 206.96-23.98 0 32.77-230.35 115.66-230.35 82.9 0-35.91 230.35 26.47 230.35 62.38 0 138.28-230.35 126.88-230.35-11.4 0-125.27 219.4-34.88 219.4 90.39 0 102.11-219.4 74.2-219.4-27.9 0 88.8 479.7-243.63 488.3-243.24 6.3 0-215.64 308.14-215.64" />
    <path class="loader__path loader__path--dot" id="loader-dot" d="M933.01 257c-11.34-1.83-17.01-9.07-17.01-21.7 0-18.95 13.86-23.3 23.81-23.3 9.96 0 18.19 7.5 18.19 18.4 0 10.9-7.63 18.05-10.4 18.05"/>
  </defs>
  
  <g class="loader__group loader__group--1" mask="url(#mask)">
    <use class="loader__path loader__path--shadow" href="#loader-main" />
    <use class="loader__path loader__path--highlight" href="#loader-main" />
    <use class="loader__path loader__path--main" stroke="url(#gradient)" href="#loader-main" />
    <use class="loader__path loader__path--dot loader__path--shadow-dot" href="#loader-dot" />
    <use class="loader__path loader__path--dot loader__path--highlight-dot" href="#loader-dot" />
    <use class="loader__path loader__path--dot loader__path--main-dot" stroke="url(#gradient)" href="#loader-dot" />
  </g>
</svg>
</div>
              
            
!

CSS

              
                $loader-path-main-length: 7960px;
$loader-path-dot-length: 120px;
$loader-duration: 3s;

$loader-stroke-width: 10.5;

$background: #54428E;

body {
  background: $background;
}

.loader {
  animation: loader $loader-duration both infinite cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: absolute;
  height: auto;
  width: 100%;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 24rem;
  
  @keyframes loader {
    0%,
    90% {
      opacity: 1;
      transform: translate3d(-50%, -50%, 0) scale(1) rotate(-6deg);
    }
    93% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translate3d(-50%, -50%, 0) scale(1.05) rotate(-6deg);
    }
  }
  
  &__lines,
  &__overlay {
    display: block;
    margin: 0 auto;
    height: auto;
    width: 100%;
    position: relative;
  }
  
  &__lines {
    
  }
  
  &__overlay {
    z-index: 2;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  &__group {
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: $loader-stroke-width;
    fill: none;
    fill-rule: evenodd;
  }
  
  &__path {
    animation: $loader-duration both infinite linear;
    stroke-dasharray: $loader-path-main-length;
    
    &--dot {
      stroke-dasharray: $loader-path-dot-length;
    }
    
    &--main {
      animation-name: loader-path-main;
      
      @keyframes loader-path-main {
        0% {
          stroke-dashoffset: #{$loader-path-main-length};
        }
        80%,
        100% {
          stroke-dashoffset: 0;
        }
      }
      
      &-dot {
        animation-name: loader-path-main-dot;
        
        @keyframes loader-path-main-dot {
          0%,
          74% {
            stroke-dashoffset: #{$loader-path-dot-length};
          }
          80%,
          100% {
            stroke-dashoffset: 0;
          }
        }
      }
    }
    
    &--shadow {
      animation-name: loader-path-shadow;
      stroke: #360568;
      transform: translate3d(0.3%, 0.3%, 0);
      
      @keyframes loader-path-shadow {
        0% {
          stroke-dashoffset: #{$loader-path-main-length};
        }
        76%,
        100% {
          stroke-dashoffset: 0;
        }
      } 
      
      &-dot {
        animation-name: loader-path-shadow-dot;
        stroke: #360568;
        transform: translate3d(0.3%, 0.3%, 0);
        
        @keyframes loader-path-shadow-dot {
          0%,
          70% {
            stroke-dashoffset: #{$loader-path-dot-length};
          }
          76%,
          100% {
            stroke-dashoffset: 0;
          }
        }
      }
    }
    
    &--highlight {
      animation-name: loader-path-shadow;
      stroke: white;
      
      &-dot {
        stroke: white;
        animation-name: loader-path-shadow-dot;
      }
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console