Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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="contain-demo">
  <div class="contain-loader">
    <!-- Begin circle loader -->
    <svg class="circle-loader" width="150px" height="150px" viewBox="0 0 250 250">
      <g class="circle-apple circle-apple-1">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M33.9 111.4c0 0-2-3.7 1.5-8.9"/>
        <path fill="#ED6E46" d="M52 128c-1 11-7 20-14 19-1 0-3-1-4-1-1 1-2 1-3 1-7 1-13-7-15-18s2-21 9-22c3 0 6 1 9 4 2-3 5-4 8-4C48 107 53 117 52 128z"/>
      </g>
      <g class="circle-apple circle-apple-2">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M216.9 111.4c0 0-2-3.7 1.5-8.9"/>
        <path fill="#ED6E46" d="M235 128c-1 11-7 20-14 19-1 0-3-1-4-1-1 1-2 1-3 1-7 1-13-7-15-18s2-21 9-22c3 0 6 1 9 4 2-3 5-4 8-4C231 107 236 117 235 128z"/>
      </g>
      <g class="circle-apple circle-apple-3">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M125.3 22.1c0 0-2-3.7 1.5-8.9"/>
        <path fill="#ED6E46" d="M143 39c-1 11-7 20-14 19-1 0-3-1-4-1-1 1-2 1-3 1-7 1-13-7-15-18-2-11 2-21 9-22 3 0 6 1 9 4 2-3 5-4 8-4C140 18 144 28 143 39z"/>
      </g>
      <g class="circle-apple circle-apple-4">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M125.3 198.2c0 0-2-3.7 1.5-8.9"/>
        <path fill="#ED6E46" d="M143 215c-1 11-7 20-14 19-1 0-3-1-4-1-1 1-2 1-3 1-7 1-13-7-15-18-2-11 2-21 9-22 3 0 6 1 9 4 2-3 5-4 8-4C140 194 144 204 143 215z"/>
      </g>
       <g class="circle-apple circle-apple-5">
         <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M58.2 44.5c0 0-2-3.7 1.5-8.9"/>
         <path fill="#ED6E46" d="M76 61c-1 11-7 20-14 19-1 0-3-1-4-1-1 1-2 1-3 1-7 1-13-7-15-18-2-11 2-21 9-22 3 0 6 1 9 4 2-3 5-4 8-4C73 40 77 50 76 61z"/>
      </g>
      <g class="circle-apple circle-apple-6">
         <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M194.1 46.5c0 0-2-3.7 1.5-8.9"/>
         <path fill="#ED6E46" d="M212 63c-1 11-7 20-14 19-1 0-3-1-4-1-1 1-2 1-3 1-7 1-13-7-15-18-2-11 2-21 9-22 3 0 6 1 9 4 2-3 5-4 8-4C209 42 213 52 212 63z"/>
      </g>
      <g class="circle-apple circle-apple-7">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M57.4 175.8c0 0-2-3.7 1.5-8.9"/>
        <path fill="#ED6E46" d="M75 193c-1 11-7 20-14 19-1 0-3-1-4-1-1 1-2 1-3 1-7 1-13-7-15-18-2-11 2-21 9-22 3 0 6 1 9 4 2-3 5-4 8-4C72 172 76 181 75 193z"/>
      </g>
      <g class="circle-apple circle-apple-8">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M196 171.3c0 0-2-3.7 1.5-8.9"/>
        <path fill="#ED6E46" d="M214 188c-1 11-7 20-14 19-1 0-3-1-4-1-1 1-2 1-3 1-7 1-13-7-15-18-2-11 2-21 9-22 3 0 6 1 9 4 2-3 5-4 8-4C210 167 215 177 214 188z"/>
      </g>
    </svg>
    <!-- End circle loader -->
  </div>
  
  <div class="contain-loader">
    <!-- Begin block loader -->
    <svg width="150px" height="150px" viewBox="0 0 250 250">
	    <g class="block-apple block-apple-1">   
        <path fill="none" stroke="#59351C"  stroke-width="2"                    stroke-linecap="round" d="M51.2    34.2c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M74 55c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23s3-26 11-28c4-1 8 1 11 5 3-4 7-5 10-5C69 29 75 41 74 55z"/>
       </g>
       <g class="block-apple block-apple-2">
         <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M124.4 33.6c0 0-2.5-4.6 1.9-11.1"/>
         <path fill="#ED6E46" d="M147 55c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23s3-26 11-28c4-1 8 1 11 5 3-4 7-5 10-5C143 28 148 40 147 55z"/>
      </g>
      <g class="block-apple block-apple-3">   
        <path fill="none" stroke="#59351C"  stroke-width="2"                    stroke-linecap="round" d="M200      34c0 0-2-5 2-11"/>
        <path fill="#ED6E46" d="M223 55c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23-2-14 3-26 11-28 4-1 8 1 11 5 3-4 7-5 10-5C218 29 224 41 223 55z"/>
      </g>
      <g class="block-apple block-apple-4">   
        <path fill="none" stroke="#59351C"  stroke-width="2"                    stroke-linecap="round" d="M52.2    108.4c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M75 129c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23s3-26 11-28c4-1 8 1 11 5 3-4 7-5 10-5C70 103 76 115 75 129z"/>
      </g>
      <g class="block-apple block-apple-5">    
        <path fill="none" stroke="#59351C"  stroke-width="2"                    stroke-linecap="round" d="M125.4    107.9c0 0-2.5-4.6 1.9-11.1"/>
         <path fill="#ED6E46" d="M148 129c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23s3-26 11-28c4-1 8 1 11 5 3-4 7-5 10-5C144 103 149 115 148 129z"/>
      </g>
      <g class="block-apple block-apple-6">  
        <path fill="none" stroke="#59351C"  stroke-width="2"                    stroke-linecap="round" d="M201.2   108.5c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M224 129c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23-2-14 3-26 11-28 4-1 8 1 11 5 3-4 7-5 10-5C219 103 225 115 224 129z"/>
      </g>
      <g class="block-apple block-apple-7">   
        <path fill="none" stroke="#59351C" stroke-width="2"                stroke-linecap="round" d="M50.9   182.1c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M73 203c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23-2-14 3-26 11-28 4-1 8 1 11 5 3-4 7-5 10-5C69 177 75 189 73 203z"/>
      </g>
	    <g class="block-apple block-apple-8">   
        <path fill="none" stroke="#59351C"  stroke-width="2"                    stroke-linecap="round" d="M124.1    181.6c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M147 202c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23-2-14 3-26 11-28 4-1 8 1 11 5 3-4 7-5 10-5C142 176 148 188 147 202z"/>
      </g>
      <g class="block-apple block-apple-9">   
        <path fill="none" stroke="#59351C"  stroke-width="2"                    stroke-linecap="round" d="M199.9    182.1c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M223 203c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23-2-14 3-26 11-28 4-1 8 1 11 5 3-4 7-5 10-5C218 177 224 189 223 203z"/>
      </g>
    </svg>
    <!-- End block loader -->
  </div>
  
  <div class="contain-loader contain-path-demo">
    <!-- Begin path loader -->
    <svg width="250px" height="250px" viewBox="0 0 400 400">     
      <circle fill="none" stroke="#7AA20D" stroke-width="5" stroke-miterlimit="10" cx="160" cy="250" r="93.033"/>
      <g id="path" class="path-apple">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M33.4 110c0 0-2.1-3.8 1.6-9.3"/>
        <path fill="#ED6E46" stroke="#ED6E46" stroke-width="1" stroke-linejoin="round" d="M52.8 129c-1.1 11.8-7.7 20.9-14.7 20.3 -1.5-0.1-2.9-0.7-4.1-1.6 -1.1 0.8-2.2 1.2-3.5 1.4 -7 1.1-14.1-7.6-15.9-19.4s2.4-22.2 9.4-23.2c3.3-0.5 6.5 1.1 9.3 4.2 2.5-3 5.6-4.6 8.7-4.3C49.1 107 53.9 117.1 52.8 129z"/>
        <animateMotion 
          xlink:href="#path"
          dur="800ms"
          repeatCount="indefinite"
          path="M218 125c0 51-42 93-93 93S32 176 32 125 74 32 125 32 218 74 218 125z"/>  
      </g>
    </svg>
    <!-- End path loader -->
  </div>
  
  <div class="contain-loader">
    <!-- Begin line loader -->
    <svg width="150" height="150" viewBox="0 0 250 250">
      <g class="line-1">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M26.5 108c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M49 129c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23s3-26 11-28c4-1 8 1 11 5 3-4 7-5 10-5C45 103 50 115 49 129z"/>
      </g>
      <g class="line-2">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M159.4 108c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M182 129c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23-2-14 3-26 11-28 4-1 8 1 11 5 3-4 7-5 10-5C178 103 183 115 182 129z"/>
      </g>
      <g class="line-3">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M224.3 108c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M247 129c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23-2-14 3-26 11-28 4-1 8 1 11 5 3-4 7-5 10-5C242 103 248 115 247 129z"/>
      </g>
      <g class="line-4">
        <path fill="none" stroke="#59351C" stroke-width="2" stroke-linecap="round" d="M91.5 108c0 0-2.5-4.6 1.9-11.1"/>
        <path fill="#ED6E46" d="M114 129c-1 14-9 25-18 24-2 0-3-1-5-2-1 1-3 2-4 2-8 1-17-9-19-23-2-14 3-26 11-28 4-1 8 1 11 5 3-4 7-5 10-5C110 103 115 115 114 129z"/>
      </g>
    </svg>
    <!-- End line loader -->
  </div>
  
</div>
              
            
!

CSS

              
                @import "compass/css3";

$background: #f2e2d1;
$circle-timing: 1800ms;
$block-timing: 1500ms;
$jump-timing: 700ms;
$repeat-count: infinite;

// General styling
body {
  background: $background;
}

.contain-demo {
  margin-top: 70px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}



// Circle loader
.circle-apple {
  transform-origin: center;
}

.circle-apple-1 {
  animation: smaller $circle-timing $repeat-count;
}

.circle-apple-5 {
  animation: smaller $circle-timing 200ms $repeat-count;
}

.circle-apple-3 {
  animation: smaller $circle-timing 600ms $repeat-count;
}

.circle-apple-6 {
  animation: smaller $circle-timing 800ms $repeat-count;
}

.circle-apple-2 {
  animation: smaller $circle-timing 1000ms $repeat-count;
}

.circle-apple-8 {
  animation: smaller $circle-timing 1200ms $repeat-count;
}

.circle-apple-4 {
  animation: smaller $circle-timing 1400ms $repeat-count;
}

.circle-apple-7 {
  animation: smaller $circle-timing 1500ms $repeat-count;
}

@keyframes smaller {
  5% {
    transform: scale(.3);
  }
}

// Block loader
.block-apple {
  opacity: 0;
}

.block-apple-1 {
  animation: appear $block-timing $repeat-count;
}

.block-apple-6 {
  animation: appear $block-timing 50ms $repeat-count;
}

.block-apple-8 {
  animation: appear $block-timing 100ms $repeat-count;
}

.block-apple-3 {
  animation: appear $block-timing 150ms $repeat-count;
}

.block-apple-7 {
  animation: appear $block-timing 200ms $repeat-count;
}

.block-apple-4 {
  animation: appear $block-timing 250ms $repeat-count;
}

.block-apple-9 {
  animation: appear $block-timing 300ms $repeat-count;
}

.block-apple-2 {
  animation: appear $block-timing 350ms $repeat-count;
}

.block-apple-5 {
  animation: appear $block-timing 450ms $repeat-count;
}

@keyframes appear {
  42% {
    opacity: 0;
  }
  43% {
    opacity: 1;
  }
  99% {
    opacity: 1;
  }
}

.contain-path-demo {
   margin-top: -80px;
}

// Line loader 
.line-1 {
  animation: jump $jump-timing $repeat-count;
}

.line-4 {
  animation: jump $jump-timing 100ms $repeat-count;
}

.line-2 {
  animation: jump $jump-timing 200ms $repeat-count;
}

.line-3 {
  animation: jump $jump-timing 300ms $repeat-count;
}

@keyframes jump {
  30% {
    transform: translateY(-20px) rotateX(60deg);
  }
  60% {
    transform: translateY(0);
  }
  90% {
    transform: translateY(0);
  }
}



              
            
!

JS

              
                /* Just some weird musings for An Apple A Day Project:
https://jonitrythall.github.io/appleproject/


Tested in Chrome only */
              
            
!
999px

Console