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 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

              
                %div.scene
  %div.wrapper
    %div.jellyfish
      - (1..16).each do |i|
        %div.jellyfish_ring
              
            
!

CSS

              
                @import compass

$numRings: 16  //equal to number of rings in HAML//
$size: 400px
$marginTop: 15%
$blur: 1.5px

$borderTopWidth: 55px
$borderRightWidth: 5px
$borderLeftWidth: 0
$borderBottomWidth: 55px

$borderTopColor: hsla(60,100%, 85%, .045)
$borderRightColor: hsla(245,100%, 85%, .15)
$borderBottomColor: transparent
$borderLeftColor: transparent

$pulseRate: 12s
$driftRate: 100s

//pause all animations//
$pauseAnimation: false

//fades in animation in on load//
$fadeIn: true

//luminescence//
$luminesce: false 
$luminesceRate: 4s


*, *:after, *:before
  box-sizing: border-box

@if $pauseAnimation
  *
    animation-play-state: paused

@keyframes fadeIn
  to
    opacity: 1

@keyframes drift
  0%
    transform: rotateX(15deg) rotateZ(15deg) rotateY(0) scale(1)
  15%
    transform: rotateX(35deg) rotateZ(30deg) rotateY(-50deg) scale(1.3)
    opacity: 1
  75%
    transform: rotateX(-35deg) rotateZ(-30deg) rotateY(50deg) scale(0.7)
    opacity: .6
  100%
    transform: rotateX(15deg) rotateZ(15deg) rotateY(0) scale(1)

@keyframes pulse
  15%
    height: 70%
    width: 60%
    left: 30%
    opacity: .5
  70%
    height: 20%

@keyframes luminesce
  0%
    border-width: $borderTopWidth 3px $borderBottomWidth $borderLeftWidth
    border-color: $borderTopColor hsla(265,100%, 85%, 1) $borderBottomColor $borderLeftColor
  25%
    border-width: $borderTopWidth 2px $borderBottomWidth $borderLeftWidth
    border-color: $borderTopColor hsla(265,100%, 90%, .1) $borderBottomColor $borderLeftColor
  50%
    border-width: $borderTopWidth 3px $borderBottomWidth $borderLeftWidth
    border-color: $borderTopColor hsla(60,100%, 85%, 1) $borderBottomColor $borderLeftColor
  75%
    border-width: $borderTopWidth 2px $borderBottomWidth $borderLeftWidth
    border-color: $borderTopColor hsla(60,100%, 90%, .1) $borderBottomColor $borderLeftColor


@keyframes move
  33.33%
    transform: translateY(-$size*.08) translateX($size*.08) translateZ($size*.28) rotateY(70deg) rotateX(10deg) rotateZ(-10deg)
  100%
  
html


body
  overflow: hidden 
  min-height: 100%
  background: #010318
  @include background-image(linear-gradient(#010737, #010318))
  background-repeat: no-repeat
  -webkit-filter: blur($blur)

.scene
  width: $size
  height: 100%
  margin: $marginTop auto 0
  perspective: 99999
  @if $fadeIn
    opacity: 0
    animation: fadeIn 10s forwards linear

.wrapper
  width: 100%
  height: 100%
  transform-style: preserve-3d
  animation: drift $driftRate infinite linear

.jellyfish
  position: relative
  width: $size
  height: $size*1.5
  margin: 0 auto
  transform-style: preserve-3d
  animation: move $pulseRate infinite ease-in-out

.jellyfish_ring
  position: absolute
  top: 0
  left: 0
  width: 100%
  height: 50%
  opacity: .8
  border-width: $borderTopWidth $borderRightWidth $borderBottomWidth $borderLeftWidth
  border-color: $borderTopColor $borderRightColor $borderBottomColor $borderLeftColor
  border-style: solid
  border-radius: 50%
  animation: pulse $pulseRate infinite cubic-bezier(0.645, 0.045, 0.355, 1.000)

@for $i from 1 through $numRings
  .jellyfish_ring:nth-child(#{$i}) 
    transform: rotateY((360/$numRings)*$i+deg)
    animation: pulse $pulseRate infinite cubic-bezier(0.645, 0.045, 0.355, 1.000)

@if $luminesce
  .jellyfish_ring:nth-child(4n+1) 
    border-style: solid dotted solid solid
    animation: pulse $pulseRate infinite cubic-bezier(0.645, 0.045, 0.355, 1.000), luminesce $luminesceRate infinite linear

              
            
!

JS

              
                
              
            
!
999px

Console