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

              
                .web
  .string__left.tipy_top
  .string__left.top
  .string__left
  .string__left.bottom
  .string__right.tipy_top
  .string__right.top
  .string__right
  .string__right.bottom
.container
  .spider
    - (0..48).each do |i|
      %div{class: "spider-hair hair__#{i}"}
    .leg__right--first
      .leg__top
      .leg__bottom
    .leg__right--second
      .leg__top
      .leg__bottom
    .leg__right--third
      .leg__top
      .leg__bottom
    .leg__right--fourth
      .leg__top
      .leg__bottom
    .leg__left--first
      .leg__top
      .leg__bottom
    .leg__left--second
      .leg__top
      .leg__bottom
    .leg__left--third
      .leg__top
      .leg__bottom
    .leg__left--fourth
      .leg__top
      .leg__bottom
    .eye
      .eye__lid
      .eye__lid-bottom
      .eye__iris
        .eye__pupil
        .eye__shine
    .eye.right
      .eye__lid
      .eye__lid-bottom
      .eye__iris
        .eye__pupil
        .eye__shine.right
.container.small.right
  .spider
    .leg__right--first
      .leg__top
      .leg__bottom
    .leg__right--second
      .leg__top
      .leg__bottom
    .leg__right--third
      .leg__top
      .leg__bottom
    .leg__right--fourth
      .leg__top
      .leg__bottom
    .leg__left--first
      .leg__top
      .leg__bottom
    .leg__left--second
      .leg__top
      .leg__bottom
    .leg__left--third
      .leg__top
      .leg__bottom
    .leg__left--fourth
      .leg__top
      .leg__bottom
.container.small
  .spider
    .leg__right--first
      .leg__top
      .leg__bottom
    .leg__right--second
      .leg__top
      .leg__bottom
    .leg__right--third
      .leg__top
      .leg__bottom
    .leg__right--fourth
      .leg__top
      .leg__bottom
    .leg__left--first
      .leg__top
      .leg__bottom
    .leg__left--second
      .leg__top
      .leg__bottom
    .leg__left--third
      .leg__top
      .leg__bottom
    .leg__left--fourth
      .leg__top
      .leg__bottom
              
            
!

CSS

              
                * {
  margin:0px;
  padding:0px;
}
body {
  background: #fd882e;
  overflow:hidden;
}
.web {
  position: relative;
  width:100%;
}
.string__left, .string__right {
  width:60vw;
  height: 20vw;
  border-top: 3px solid white;
  border-radius: 100%;
  display: block;
  position: absolute;
  top: 0vw;
}
.string__left {
  left: -10vw;
  animation: web-sway 5s infinite;
}
.string__right {
  right: -10vw;
  animation: web-sway__right 5s infinite;
}
.string__right.bottom, .string__left.bottom {
  top: 4vw;
}
.string__right.top, .string__left.top {
  top: -4vw;
}
.string__right.tipy_top, .string__left.tipy_top {
  top: -8vw;
}
.string__left.tipy_top, .string__left.top {
  animation: web-sway--slower 5s infinite;
}
.string__right.tipy_top, .string__right.top {
  animation: web-sway__right--slower 5s infinite;
}

.container {
  height: 20vw * 1.5;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: spider-drop 1.15s 1, spider-sway 5s infinite;
  transform: rotate(0.75deg);
  transform-origin: top;
  &.small {
    &.right {
      height: 5vw * 1.5;
      right: 21vw;
      left: inherit;
      animation: spider-sway 8s infinite;
    }
    height: 10vw * 1.5;
    position: absolute;
    left: 13vw;
    top: 0vw;
    animation: spider-sway 10s infinite 1s;
    .spider {
      width: 1.5vw;
      height: 1.5vw;
      animation: none;
      .spider-hair {
        display:none;
      }
    }
    &:after { 
      width: 0.15vw;  
    }
    .eye {
      width: 0.65vw;
      height: 0.65vw;
      &__iris {
        width: 0.25vw;
        height: 0.25vw;
      }
    }
  }
  &:after {
    height: 100%;
    width: 0.3vw;
    background: #fff;
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
  }
}
.spider {
  background: black;
  border-radius: 50%;
  width: 10vw;
  height: 10vw;
  animation: spider-drop-body 1.15s;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.spider-hair {
  width: 10vw;
  display: block;
  padding: 0 0.45vw;
  height: 0.175vw;
  background: black;
  position: absolute;
}

@for $i from 0 through 48 {
   .hair__#{$i} {
     z-index: #{$i};
     transform: rotate( #{($i*3.664)}deg);
   }
}

@keyframes web-sway {
  0% {
    margin-left:0px;
    animation-timing-function: ease-in-out;
  }
  25% {
    margin-left: 0.3vw;
    animation-timing-function: ease-in-out;
  }
  50% {
    margin-left:-0.4vw;
    animation-timing-function: ease-in-out;
  }
  75% {
    margin-left: 0.30vw;
    animation-timing-function: ease-in-out;
  }
  100% {
    marign-left: 0vw;
    animation-timing-function: ease-in-out;
  }
}

@keyframes web-sway__right {
  0% {
    margin-left:0px;
    animation-timing-function: ease-in-out;
  }
  25% {
    margin-right: -0.3vw;
    animation-timing-function: ease-in-out;
  }
  50% {
    margin-right:0.3vw;
    animation-timing-function: ease-in-out;
  }
  75% {
    margin-right: -0.32vw;
    animation-timing-function: ease-in-out;
  }
  100% {
    marign-left: 0vw;
    animation-timing-function: ease-in-out;
  }
}

@keyframes web-sway--slower {
  0% {
    margin-left:0px;
    animation-timing-function: ease-in-out;
  }
  25% {
    margin-left: 0.1vw;
    animation-timing-function: ease-in-out;
  }
  50% {
    margin-left:-0.14vw;
    animation-timing-function: ease-in-out;
  }
  75% {
    margin-left: 0.20vw;
    animation-timing-function: ease-in-out;
  }
  100% {
    marign-left: 0vw;
    animation-timing-function: ease-in-out;
  }
}

@keyframes web-sway__right--slower {
  0% {
    margin-left:0px;
    animation-timing-function: ease-in-out;
  }
  25% {
    margin-right: -0.1vw;
    animation-timing-function: ease-in-out;
  }
  50% {
    margin-right:0.2vw;
    animation-timing-function: ease-in-out;
  }
  75% {
    margin-right: -0.1vw;
    animation-timing-function: ease-in-out;
  }
  100% {
    marign-left: 0vw;
    animation-timing-function: ease-in-out;
  }
}


@keyframes spider-sway {
  0% {
    transform: rotate(0.75deg);
    animation-timing-function: ease-in-out;
  }
  25% {
    transform: rotate(-1.3deg);
    animation-timing-function: ease-in-out;
  }
  50% {
    transform: rotate(1.8deg);
    animation-timing-function: ease-in-out;
  }
  75% {
    transform: rotate(-1.2deg);
    animation-timing-function: ease-in-out;
  }
  100% {
    transform: rotate(0.75deg);
    animation-timing-function: ease-in-out;
  }
}

@keyframes spider-drop {
  0% {
    animation-timing-function: cubic-bezier(0.18, 0.79, 0.62, 1);
    height: 0px;
  }
  40% {
    animation-timing-function: cubic-bezier(0.18, 0.79, 0.62, 1);
    height: 23vw * 1.5;
  }
  60% {
    animation-timing-function: cubic-bezier(0.45,-0.04, 0.94, 0.46);
    height: 17vw * 1.5;
  }
  75% {
    animation-timing-function: cubic-bezier(0.18, 0.79, 0.62, 1);
    height: 21vw * 1.5;    
  }
  90% {
    animation-timing-function: cubic-bezier(0.45,-0.04, 0.94, 0.46);
    height: 19.5vw * 1.5;
  }
  95% {
    animation-timing-function: cubic-bezier(0.18, 0.79, 0.62, 1);
    height: 20.3vw * 1.5;
  }
  100% {
    animation-timing-function: cubic-bezier(0.45,-0.04, 0.94, 0.46);
    height: 20vw * 1.5;
  }
}

@keyframes spider-drop-body {
  0% {
    
  }
  39% {
    height: 11.5vw;
    width: 9.5vw;
  }
  40% {
    height: 8.5vw;
    width: 11vw;

  }
  41% {
    height: 12vw;
    width: 9vw;
  }
  60% {
    height: 10vw;
    width: 10vw
  }  
}

.eye {
    border-radius: 100%;
    background: #ffffff;
    width: 2.5vw;
    height: 2.5vw;
    margin-left: 0.39vw;
    margin-top: 0.39vw;
    position: absolute;
    top: 5vw;
    z-index: 49;
    left: 2vw;
    display: flex;
    justify-content: center;
    align-items: center;
  
    &.right {
      right: 2vw;
      left: inherit;
    }

    &__lid {
      background: black;
      height: 3.1vw;
      width: 3.1vw;
      position: absolute;
      border-radius: 100%;
      z-index: 999;
      top: -3.1vw;
    }
    &__lid-bottom {
      background: black;
      height: 1.3vw;
      width: 2.6vw;
      position: absolute;
      z-index: 999;
      top: 2.5vw;
    }
    &__iris {
      border-radius: 100%;
      background: black;
      width: 1.25vw;
      height: 1.25vw;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-left: 0px;
      margin-top: 0px;
    }

    &__shine {
      border-radius: 100%;
      background: #fbfdf8;
      width: 0.25vw;
      height: 0.25vw;
      position: absolute;
      right: 0.15vw;
      top: 0.1vw;
      &.right {
        left: 0.15vw;
        right: inherit;
      }
    }
  }

@mixin leg__base($top, $side, $deg, $origin) {
  position: absolute;
  z-index: 50;
  top: #{$top}vw;
  #{$origin}: #{$side}vw;
  transform-origin: left;
  transform: rotate(#{$deg}deg);
}

@mixin leg__top($width) {
  width: #{$width}vw;
  height: 0.25vw;
  background: black;
  position: relative;
}

@mixin leg__bottom($right, $top, $width, $deg) {
  position: absolute;
  right: #{$right}10%;
  top: #{$top}vw;
  width: #{$width}vw;
  height: 0.25vw;
  background: black;
  transform: rotate(#{$deg}deg);
  transform-origin: right;
  border-radius: 50%;
}

.leg__left--first {
  animation: leg__left--first 2s infinite;
  @include leg__base(1.5, 1, 215, left);
  .leg__top {
    @include leg__top(3);
  }
  .leg__bottom {
    animation: leg__left--first_bottom 2s infinite 0.5s;
    @include leg__bottom(0.1, -0.1, 5, 115);
  }
}

.small {
  .leg__top, .leg__bottom {
   width: 1.5vw !important;
   height: 0.1vw !important;
  }
  .leg__left--first {
    animation: leg__left--first 1s infinite;
    @include leg__base(0.5, 1, 215, left);
    .leg__bottom {
      animation: leg__left--first_bottom 1s infinite 0.5s;
    }
  }
  .leg__left--second {
    animation: leg__left--second 2s infinite;
    @include leg__base(1, 1, 215, left);
  }
  .leg__left--third {
    animation: leg__left--third 1s infinite;
    @include leg__base(1.1, 0.9, 190, left);
    .leg__bottom {
      animation: leg__left--third_bottom 1.25s infinite 0.25s;
    }
  }
  .leg__left--fourth {
    animation: leg__left--fourth 2s infinite;
    @include leg__base(1.0, 0.2, 130, left);
    .leg__top {
      width: 0.7vw !important;
    }
  }
  
  .leg__right--first {
    animation: leg__right--first 1.75s infinite;
    @include leg__base(0.5, -0.5, -35, right);
    .leg__bottom {
      animation: leg__right-first_bottom 2s infinite 0.5s;
    }
  }

  .leg__right--second {
    animation: leg__right--second 2s infinite;
    @include leg__base(0.85, -0.5, -25, right);
    .leg__bottom {
      animation: leg__right--second_bottom 2s infinite 0.5;
      @include leg__bottom(0.1, -0.1, 5.2, -110);
    }
  }

  .leg__right--third {
    animation: leg__right--third 2s infinite;
    @include leg__base(0.9, -0.5, -10, right);
    .leg__bottom {
      animation: leg__right--third_bottom 2.5s infinite 0.5;
    }
  }

  .leg__right--fourth {
    @include leg__base(0.9, -0.5, 30, right);
    animation: leg__right--fourth 2s infinite;
    .leg__top {
      width: 0.9vw !important;
    }
    .leg__bottom {
      @include leg__bottom(0.1, -0.1, 5.2, -110);
      animation: leg__right--fourth_bottom 2s infinite 0.5s;
    }
  }
}


.leg__left--second {
  animation: leg__left--second 2s infinite;
  @include leg__base(4, 1, 215, left);
  .leg__top {
    @include leg__top(3.2);
  }
  .leg__bottom {
    animation: leg__left--second_bottom 2s infinite 0.5s;
    @include leg__bottom(0.1, -0.1, 5.2, 110);
  }
}

.leg__left--third {
  animation: leg__left--third 2s infinite;
  @include leg__base(5.0, 0.5, 190, left);
  .leg__top {
    @include leg__top(3.2);
  }
  .leg__bottom {
    animation: leg__left--third_bottom 1.5s infinite 0.25s;
    @include leg__bottom(0.1, -0.1, 5.2, 100);
  }
}

.leg__left--fourth {
  animation: leg__left--fourth 2s infinite;
  @include leg__base(7.0, 0.5, 130, left);
  .leg__top {
    @include leg__top(3.2);
  }
  .leg__bottom {
    animation: leg__left--fourth_bottom 2s infinite 0.5s;
    @include leg__bottom(0.1, -0.1, 5.2, 110);
  }
}


.leg__right--first {
  animation: leg__right--first 1.5s infinite;
  @include leg__base(1.5, -2, -35, right);
  .leg__top {
    @include leg__top(3);
  }
  .leg__bottom {
    animation: leg__right-first_bottom 1.5s infinite 0.5s;
    @include leg__bottom(0.1, -0.1, 5, -115);
  }
}

.leg__right--second {
  animation: leg__right--second 2s infinite;
  @include leg__base(3.5, -2.5, -25, right);
  .leg__top {
    @include leg__top(3.2);
  }
  .leg__bottom {
    animation: leg__right--second_bottom 2s infinite 0.5;
    @include leg__bottom(0.1, -0.1, 5.2, -110);
  }
}

.leg__right--third {
  animation: leg__right--third 1s infinite;
  @include leg__base(5.2, -3, -10, right);
  .leg__top {
    @include leg__top(3.2);
  }
  .leg__bottom {
    animation: leg__right--third_bottom 1s infinite 0.5;
    @include leg__bottom(0.1, -0.1, 5.2, -100);
  }
}

.leg__right--fourth {
  @include leg__base(7.2, -2.5, 30, right);
  animation: leg__right--fourth 2s infinite;
  .leg__top {
    @include leg__top(3.2);
  }
  .leg__bottom {
    @include leg__bottom(0.1, -0.1, 5.2, -110);
    animation: leg__right--fourth_bottom 2s infinite 0.5s;
  }
}



@mixin mixin__animation_leg($from, $to) {
  0% {
    transform: rotate(#{$from}deg);
  }
  50% {
    transform: rotate(#{$to}deg);
  }
  100% {
    transform: rotate(#{$from}deg);
  }
}

@keyframes leg__right--fourth {
  @include mixin__animation_leg(30, 31);
}

@keyframes leg__right--fourth_bottom {
  @include mixin__animation_leg(-110, -112);
}

@keyframes leg__right--third {
  @include mixin__animation_leg(-10,-9);
}

@keyframes leg__right--third_bottom {
  @include mixin__animation_leg(-100, -102);
}

@keyframes leg__right--second {
  @include mixin__animation_leg(-30, -28);
}

@keyframes leg__right--second_bottom {
  @include mixin__animation_leg(-110, -113);
}

@keyframes leg__right--first {
  @include mixin__animation_leg(-35, -33);
}

@keyframes leg__right--first_bottom {
  @include mixin__animation_leg(-115, -114);
}


/* Left Leg Animations */
@keyframes leg__left--fourth {
  @include mixin__animation_leg(135, 138);
}

@keyframes leg__left--fourth_bottom {
  @include mixin__animation_leg(110, 112);
}

@keyframes leg__left--third {
  @include mixin__animation_leg(190,192);
}

@keyframes leg__left--third_bottom {
  @include mixin__animation_leg(100, 102);
}

@keyframes leg__left--second {
  @include mixin__animation_leg(215, 218);
}

@keyframes leg__left--second_bottom {
  @include mixin__animation_leg(109, 112);
}

@keyframes leg__left--first {
  @include mixin__animation_leg(215, 212);
}

@keyframes leg__left--first_bottom {
  @include mixin__animation_leg(115, 114);
}


@keyframes blink {
  0% {
    top: -3.1vw;
    animation-timing-function: linear;
  }
  3.5% {
    top: -3.1vw;
    animation-timing-function: linear;
  }
  4% {
    top: 0vw;
    animation-timing-function: linear;
  }
  5% {
    top: 0vw;
    animation-timing-function: linear;
  }
  6% {
    top: -3.1vw;
    animation-timing-function: linear;
  }
  70.5% {
    top: -3.1vw;
    animation-timing-function: linear;
  }
  71% {
    top: 0vw;
    animation-timing-function: linear;
  }
  72% {
    top: 0vw;
    animation-timing-function: linear;
  }
  72.9% {
    top: -3.1vw;
    animation-timing-function: linear;
  }
}

@keyframes blink-bottom {
  0% {
    top:2.5vw;
    animation-timing-function: linear;
  }
  3.5% {
    top: 2.5vw;
    animation-timing-function: linear;
  }
  4% {
    top: 1vw;
    animation-timing-function: linear;
  }
  5% {
    top: 1vw;
    animation-timing-function: linear;
  }
  6% {
    top: 2.5vw;
    animation-timing-function: linear;
  }
  70.5% {
    top: 2.5vw;
    animation-timing-function: linear;
  }
  71% {
    top: 1vw;
    animation-timing-function: linear;
  }
  72% {
    top: 1vw;
    animation-timing-function: linear;
  }
  72.9% {
    top: 2.5vw;
    animation-timing-function: linear;
  }
}
.eye__lid {
  animation: blink 6.5s infinite;
  animation-delay: 2s;
}
.eye__lid-bottom {
  animation: blink-bottom 6.5s infinite;
  animation-delay: 2s;
}


@keyframes iris_move {
  0% {
    margin-left: 0.39vw;
    margin-top: 0.39vw;
    animation-timing-function: linear;
  }
  3% {
    margin-left: -0.5vw;
    margin-top: -0.5vw;
    animation-timing-function: linear;
  }
  4% {
    margin-left: -0.5vw;
    margin-top: -0.5vw;
    animation-timing-function: linear;
  }
  45% {
    margin-left: -0.51vw;
    margin-top: -0.51vw;
    animation-timing-function: linear;
  }
  47% {
    margin-left: -0.72vw;
    margin-top: 0.21vw;
    animation-timing-function: linear;
  }
  50% {
    margin-left: -0.77vw;
    margin-top: 0.21vw;
    animation-timing-function: linear;
  }
  70% {
    margin-left: -0.77vw;
    margin-top: 0.21vw;
    animation-timing-function: linear;
  }
  73% {
    margin-left: 0.36vw;
    margin-top: 0.31vw;
    animation-timing-function: linear;
  }
  96% {
    margin-left: 0.36vw;
    margin-top: 0.36vw;
    animation-timing-function: linear;
  }
  100% {
    margin-left: 0.39vw;
    margin-top: 0.39vw;
    animation-timing-function: linear;
  }
}
.eye__iris {
  animation: iris_move 4s infinite alternate;
}
              
            
!

JS

              
                
              
            
!
999px

Console