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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                h1 Raindrops
h2 Inspired by Bees & Bombs (via 
  a(href="https://twitter.com/beesandbombs/status/743196639674966016", target="blank") twitter
  |)

ul
  -for (var x=0; x<8; x++)
    li
      span.raindrop
      span.ripple
              
            
!

CSS

              
                body
  background: hsl(0, 0, 10)
  font-family: sans-serif
h1, h2
  position: absolute
  left: 50%
  transform: translateX(-50%)
  color: hsl(0, 0, 100)
  text-transform: uppercase
  letter-spacing: 2px
h1
  top: 24px
  font-size: 12px
h2
  top: 44px
  font-size: 10px
  opacity: 0.7
  a
    color: hsl(0, 0, 100)
    text-decoration: none
    border-bottom: 1px dotted lighten(hsl(0, 0, 10), 50%)
  
 

    
$raindrops: 8
$rotation: 0deg
$duration: 8s

body
  width: 100%
  height: 100vh
  perspective: 600px
ul
  position: absolute
  width: 60vh
  height: 60vh
  border-radius: 50%
  top: 50%
  left: 50%
  transform: translate(-50%, -50%) rotateX(65deg)
  transform-style: preserve-3d
  li
    position: absolute
    width: 100%
    height: 100%
    top: 0
    left: 50%
    border-radius: 50%
    transform-style: preserve-3d
    span
      position: absolute
      top: 50%
      left: 50%
      border-radius: 50%
    span.raindrop
      width: 5px
      height: 5px
      background: hsl(0, 0, 80)
      animation: raindrop $duration ease-in infinite
      animation-fill-mode: backwards
    span.ripple
      width: 100%
      height: 100%
      border: 2px solid hsl(0, 0, 80)
      animation: ripple $duration ease-out infinite
      animation-fill-mode: backwards
@for $i from 1 through $raindrops
  $rotation: $rotation + 45
  $delay: $i - 1
  li:nth-child(#{$i})
    transform-origin: 50% 100%
    transform: translate(-50%, -50%) rotate($rotation)
    span.raindrop, 
    span.ripple
      animation-delay: #{$delay}s
      
      
      
@keyframes raindrop
  0%
    opacity: 0
    transform: translate(-50%, -50%) translateZ(200px)
  1%, 9%
    opacity: 1
  10%, 100%
    opacity: 0
    transform: translate(-50%, -50%) translateZ(0px)

@keyframes ripple
  0%, 10%
    transform: translate(-50%, -50%) scale(0)
  40% 
    opacity: 1
  80%, 100%
    opacity: 0
    transform: translate(-50%, -50%) scale(1)
  
  
              
            
!

JS

              
                
              
            
!
999px

Console