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

              
                - var n = 0
- var m = 0
.loader
  while n < 32
    - n++
    - m = 0
    .container
      .shadow
      .point
        while m < 10
          - m++
          .face
              
            
!

CSS

              
                $primary-color: #000
$background-color: #FFF
$size-point: 20px

body
  background: $background-color

@keyframes anim-container
  0%
    transform: translate(-50%, 0) rotateY(0deg)
  50%
    transform: translate(-50%, 0) rotateY(90deg)
  100%
    transform: translate(-50%, 0) rotateY(180deg)
  

.loader
  width: 32 * $size-point
  position: absolute
  left: 50%
  top: 50%
  perspective: 800px
  transform-style: preserve-3d
  animation-name: anim-container
  animation-duration: 8s
  animation-timing-function: ease-in-out
  animation-iteration-count: infinite
  animation-direction: alternate

.container
  width: $size-point
  height: $size-point
  float: left
  position: relative
  
.point
  position: relative
  width: 100%
  height: 100%
  border-radius: 50%
  transform-style: preserve-3d
  backface-visibility: visible
  
  animation-timing-function: linear
  animation-iteration-count: infinite
  animation-direction: normal
  
.shadow
  position: absolute
  top: 150px
  width: 100%
  height: 100%
  border-radius: 50%
  background-image: radial-gradient(circle , rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%)
  transform-style: preserve-3d
  animation-timing-function: ease-out, ease-in, ease-out, ease-in
  animation-iteration-count: infinite
  animation-direction: normal
  
.face
  position: absolute
  border-radius: 50%
  background-color: $primary-color

@for $i from 1 through 32
  @keyframes anim-shadow-#{$i}
    0%
      transform: rotateX(90deg) translateY(#{2 * $i}px) scale(0.7)
    25%
      transform: rotateX(90deg) translateY(0) scale(#{0.7 + 0.3 * $i / 32})
    50%
      transform: rotateX(90deg) translateY(#{-2 * $i}px) scale(0.7)
    75%
      transform: rotateX(90deg) translateY(0) scale(#{0.7 - 0.3 * $i / 32})
    100%
      transform: rotateX(90deg) translateY(#{2 * $i}px) scale(1)

  @keyframes anim-#{$i}
    0%
      transform: rotateX(-0deg) translate3d(0, 0, #{2 * $i}px) rotateX(0deg)
    100%
      transform: rotateX(-360deg) translate3d(0, 0, #{2 * $i}px) rotateX(360deg)

  $size: (2 - 0.1) / 32 * $i * $size-point
  $duration: 1 / (33 - $i) * 16000ms
 
  .container:nth-child(#{$i}) .face
    width: $size
    height: $size
  
  .container:nth-child(#{$i}) .shadow
    width: $size
    height: $size
    animation-name: anim-shadow-#{$i}
    animation-duration: $duration

  .container:nth-child(#{$i}) .point
    animation-name: anim-#{$i}
    animation-duration: $duration

@for $i from 1 through 10
  .face:nth-child(#{$i})
    transform: rotateY(#{18 * $i}deg)

              
            
!

JS

              
                
              
            
!
999px

Console