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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                h1 Pure HTML+CSS Animation Loading Icon
.row
  .col-sm-4
    h3 Swirling Rings
    .loading-ani-icon-0
      div
        div
  .col-sm-4
    h3 Normal Style
    .loading-ani-icon-1
      - for(var i = 1; i < 13; i++) {
        div
      - }
  .col-sm-4
    h3 Rainbow Style
    .loading-ani-icon-2
      - for(var i = 1; i < 13; i++) {
        div
      - }
  .col-sm-4
    h3 Rainbow Style
    .loading-ani-icon-3
      - for(var i = 1; i < 13; i++) {
        div
      - }
  .col-sm-4
    h3 Natural Style
    .loading-ani-icon-4
      - for(var i = 1; i < 13; i++) {
        div
      - }
  .col-sm-4
    h3 Snow Style
    .loading-ani-icon-5
      - for(var i = 1; i < 13; i++) {
        div
      - }
  .col-sm-4
    h3 Gangnam Style
    .loading-ani-icon-6
      - for(var i = 1; i < 13; i++) {
        div
      - }




              
            
!

CSS

              
                body {
  margin: 50px 20px;
  text-align: center;
}

h1 {
  font-size: 2em;
  font-weight: 100;
  color: #999;
}

h3 {
  margin: 50px 0 20px 0;
  font-size: .75em;
  color: #666;
}

.loading-ani-icon-0 {
  display: inline-block;
  width: fit-content;
  /*border: 2px solid transparent;*/
  border-top: 2px solid #FCA;
  border-radius: 100%;
  animation: loading-icon-rotate 2s infinite linear;

  > div {
    margin: 2px;
    /*border: 2px solid transparent;*/
    border-top: 2px solid #FE7;
    border-radius: 100%;
    animation: loading-icon-rotate 2s infinite linear;

    > div {
      margin: 2px;
      width: 50px;
      height: 50px;
      /*border: 2px solid transparent;*/
      border-top: 2px solid #9FA;
      border-radius: 100%;
      animation: loading-icon-rotate 2s infinite linear;
    }
  }
}

@keyframes loading-icon-rotate {
  to {
    transform: rotate(360deg);
  }
}

.loading-ani-icon-1 {
  display: inline-block;
  position: relative;
  width: 50px;
  height: 50px;
  
  div {
    position: absolute;
    left: calc(50% - 1px);
    top: 0;
    width: 2px;
    height: 12px;
    margin: 0 auto;
    background: rgba(0,0,0,.5);
    border-radius: 10px;
    transform-origin: center 25px;
    animation: 1.2s ani1 infinite;
    opacity: .2;
    
    @for $i from 1 through 11 {
      &:nth-child(#{$i + 1}) {
        transform: rotate($i * 30deg);
        animation-delay: $i * .1s;
      }
    }
  }
}

@keyframes ani1 {
  0% {
    opacity: 1
  }
  100% {
    opacity: .2
  }
}


.loading-ani-icon-2 {
  display: inline-block;
  position: relative;
  width: 50px;
  height: 50px;
  
  div {
    position: absolute;
    left: calc(50%-1px);
    top: 0;
    width: 2px;
    height: 12px;
    margin: 0 auto;
    background: rgba(255,255,255,1);
    border-radius: 100px;
    transform-origin: center 25px;
    animation: 1.2s ani2 infinite;
    opacity: .2;
    
    @for $i from 1 through 11 {
      &:nth-child(#{$i + 1}) {
        transform: rotate($i * 30deg);
        animation-delay: $i * .1s;
      }
    }
  }
}

@keyframes ani2 {
  0% {
    background: rgba(255,0,255,1);
    width: 2px;
    left: calc(50% - 1px);
  }
  50% {
    background: rgba(255,255,0,1);
    width: 50px;
    left: calc(50% - 25px);
  }
  100% {
    background: rgba(0,255,255,1);
    width: 2px;
    left: calc(50% - 1px);
  }
}



.loading-ani-icon-3 {
  display: inline-block;
  position: relative;
  width: 50px;
  height: 50px;
  
  div {
    position: absolute;
    left: calc(50% - 4px);
    top: 0;
    width: 8px;
    height: 8px;
    margin: 0 auto;
    background: rgba(0,0,0,.65);
    border-radius: 10px;
    transform-origin: center 25px;
    animation: 1.2s ani3 infinite;
    opacity: .1;
    
    @for $i from 1 through 11 {
      &:nth-child(#{$i + 1}) {
        transform: rotate($i * 30deg);
        animation-delay: $i * .1s;
      }
    }
  }
}

@keyframes ani3 {
  0% {
    opacity: 1
  }
  100% {
    opacity: .1
  }
}



.loading-ani-icon-4 {
  display: inline-block;
  position: relative;
  width: 50px;
  height: 50px;
  
  div {
    position: absolute;
    left: calc(50% - 2px);
    top: 0;
    width: 4px;
    height: 10px;
    margin: 0 auto;
    background: rgba(255,255,255,1);
    border-radius: 100px;
    transform-origin: center 25px;
    animation: 1.2s ani4 infinite;
    opacity: .4;
    
    @for $i from 1 through 11 {
      &:nth-child(#{$i + 1}) {
        transform: rotate($i * 30deg);
        animation-delay: $i * .1s;
      }
    }
  }
}

@keyframes ani4 {
  0% {
    background: rgba(255,200,20,1);
  }
  50% {
    background: rgba(200,255,20,1);
  }
  100% {
    background: rgba(100,200,230,1);
  }
}



.loading-ani-icon-5 {
  display: inline-block;
  position: relative;
  width: 50px;
  height: 50px;
  
  div {
    position: absolute;
    left: calc(50% - 1px);
    top: 0;
    width: 2px;
    height: 35px;
    margin: 0 auto;
    background: linear-gradient(0deg, #69c, #fff);
    border-radius: 100%;
    transform-origin: center 25px;
    animation: 1.2s ani5 infinite;
    opacity: .2;
    
    @for $i from 1 through 11 {
      &:nth-child(#{$i + 1}) {
        transform: rotate($i * 30deg);
        animation-delay: $i * .1s;
      }
    }
  }
}

@keyframes ani5 {
  0% {
    opacity: 1
  }
  100% {
    opacity: .2
  }
}



.loading-ani-icon-6 {
  display: inline-block;
  position: relative;
  width: 50px;
  height: 50px;
  
  div {
    position: absolute;
    left: calc(50% - 1px);
    top: 0;
    width: 2px;
    height: 35px;
    margin: 0 auto;
    background: linear-gradient(0deg, #69c, #fff);
    border-radius: 100%;
    transform-origin: center 25px;
    animation: 1.2s ani6 infinite;
    opacity: .2;
    
    @for $i from 1 through 11 {
      &:nth-child(#{$i + 1}) {
        transform: rotate($i * 30deg);
        animation-delay: $i * .1s;
      }
    }
  }
}

@keyframes ani6 {
  0% {
    background: rgba(255,0,255,1);
    width: 2px;
    left: calc(50% - 1px);
  }
  50% {
    background: rgba(255,255,0,1);
    width: 50px;
    left: calc(50% - 25px);
  }
  100% {
    background: rgba(0,255,255,1);
    width: 2px;
    left: calc(50% - 1px);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console