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

              
                .pane
    .cube
        .side
        .side
        .side
        .side
        .side
        .side
    .circle
        .atomWrap
            .atom
    .circle.two
        .atomWrap
            .atom
    .circle.three
        .atomWrap
            .atom
    .circle.four
        .atomWrap
            .atom
    .circle.five
        .atomWrap
            .atom
.shadow
              
            
!

CSS

              
                @import bourbon

$green: #07190a
$size: 100px
$diametre: $size*3
$atomDiametre: $diametre / 60
$diametre2: $size*2.5
$atomDiametre2: $diametre2 / 60

html,
body
  width: 100%
  height: 100%
  
body
  background: #fafafa
  perspective: 1000px
  display: flex
  align-items: center

+keyframes(pane)
  to
    +transform(rotateX(-720deg) rotateY(-720deg) rotateZ(-360deg))
  
+keyframes(cube)
  to
    +transform(rotateX(720deg) rotateY(720deg) rotateZ(360deg))

+keyframes(circle)
  to
    +transform(rotateX(360deg) rotateY(-360deg) rotateZ(720deg))

+keyframes(circle2)
  to
    +transform(rotateX(-360deg) rotateY(360deg) rotateZ(-720deg))

+keyframes(atomWrap)
  to
    +transform(rotate(360deg))
 
+keyframes(atomWrap2)
  to
    +transform(rotate(-360deg))
     
.pane
  margin: auto
  left: 0
  right: 0
  top: 0
  bottom: 0
  width: $diametre
  height: $diametre
  +transform-style(preserve-3d)
  +transform(rotateX(0deg) rotateY(0deg) rotateZ(0deg))
  +animation(pane 15s linear infinite)
  
.cube
  position: absolute
  margin: auto
  left: 0
  right: 0
  top: 0
  bottom: 0
  width: $size
  height: $size
  +transform-style(preserve-3d)
  +transform(rotateX(0deg) rotateY(0deg) rotateZ(0deg))
  +transform-origin(center center $size/2)
  +animation(cube 5s linear infinite)
  .side
    width: $size
    height: $size
    position: absolute
    opacity: 0.2
    box-shadow: inset 0 50px 50px 0 rgba(lighten(saturate($green,100), 50),.5)
    &:nth-of-type(1),
    &:nth-of-type(2),
    &:nth-of-type(3)
      +background-image(linear-gradient(45deg, $green - 20, lighten(saturate($green,50), 70)))
    &:nth-of-type(4),
    &:nth-of-type(5),
    &:nth-of-type(6)
      +background-image(linear-gradient(-45deg, $green - 20, lighten(saturate($green,50), 70)))
    &:nth-of-type(1)
      +transform-origin(center top)
      +transform(rotateX(90deg))
    &:nth-of-type(2)
      +transform-origin(center bottom)
      +transform(rotateX(-90deg))
    &:nth-of-type(3)
      +transform-origin(left center)
      +transform(rotateY(-90deg))
    &:nth-of-type(4)
      +transform-origin(right center)
      +transform(rotateY(90deg))
    &:nth-of-type(5)
      +transform-origin(center center)
      +transform(translateZ($size))
   
.atomWrap
  width: $atomDiametre
  height: $diametre / 2
  position: absolute
  margin: 0 auto
  left: 0
  right: 0
  top: 0    
  +transform-origin(center bottom)
  +animation(atomWrap 3s linear infinite)
        
.circle
  width: $diametre
  height: $diametre
  position: absolute
  margin: auto
  left: 0
  right: 0
  top: 0
  bottom: 0
  border-radius: 50%
  box-shadow: inset 0 0 0 1px rgba(lighten(saturate($green,50), 10),.25)
  +transform-style(preserve-3d)
  +transform(rotateX(0deg) rotateY(0deg) rotateZ(0deg))
  +transform-origin(center center center)
  +animation(circle 10s linear infinite)
  &.two
    +animation(circle 20s linear infinite)
  &.three
    +animation(circle 40s linear infinite)
  &.four,
  &.five
    width: $diametre2
    height: $diametre2
    .atomWrap
      width: $atomDiametre2
      height: $diametre2 / 2
      +animation(atomWrap2 6s linear infinite)
    .atom
      width: $atomDiametre2
      height: $atomDiametre2
  &.four
    +animation(circle2 2.5s linear infinite)
  &.five
    +animation(circle2 10s linear infinite)
    
    
.atom
  $atomSize: $atomDiametre
  position: absolute
  margin: 0 auto
  left: 0
  right: 0
  top: - $atomDiametre / 2
  width: $atomSize
  height: $atomSize
  border-radius: 50%
  background: pink
  
    
.shadow
  width: $size
  height: $size /2
  position: absolute
  background-color: rgba(black, .1)
  margin: auto
  left: 0
  right: 0
  top: 0
  bottom: 0
  border-radius: 50%
  opacity: 0.1
  +transform(rotateX(70deg) translateY($diametre))
              
            
!

JS

              
                
              
            
!
999px

Console