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.

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 class="fox">
  <div class="leg-outer">
    <div class="leg">
      <div class="paw">
        <div class="log">
          <div class="log-inner">
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="snow"></div>
              
            
!

CSS

              
                $color-fox: transparent !default;
$color-fox-dark: transparent !default;
$color-white: transparent !default;
$color-black: transparent !default;
$color-inner-ears: transparent !default;

*, *::before, *::after {
  border: solid 1px;
}

$color-fox: #E2DEE8;
$color-fox-dark: #C7C3D0;
$color-white: #F0E9EC;
$color-black: #000;
$color-inner-ears: #D5D1DC;

$color-bg: #9095B9;

$fox-width: 470px;
$fox-height: 335px;

$duration: 0.9s;
$delay-hind: -$duration / 4;
$easing: cubic-bezier(0.445, 0, 0.55, 1);


.fox {
  width: $fox-width;
  height: $fox-height;
  min-width: $fox-width;
  min-height: $fox-height;
  
  * {
    position: absolute;
  }
  
  &:after {
    content: '';
    display: block;
    position: absolute;
    width: 80%;
    height: 20px;
    border-radius: 100%;
    background: rgba($color-black, 0.2);
    bottom: -10px;
    left: 10%;
    z-index: -1;
  }
}

// Cette partie un peu complexe est la "fabrique" a animations, et doit absolument etre bien comprise
$kfs: (
  -30 15   -20 50,
  25 -15   15 30,
); 
$anims: log, log-inner, hind-log, hind-log-inner;
$a-len: length($anims);
$k-len: length($kfs);
@function a($name) {
  @return unquote('#{$name} #{$duration} #{$easing} both infinite');
}

@for $a from 1 through $a-len {
  @keyframes #{nth($anims, $a)} {    
    @for $i from 1 through $k-len {
      $val: nth(nth($kfs, $i), $a);
      @if ($val != x) {        
        $rot: $val * 1deg;
        $p: if($i == 1, unquote('from, to'), percentage(($i - 1) / ($k-len )));

        #{$p} {
          transform: rotate($rot);
        }
      }
    }
  }
}

.leg-outer {
  bottom: 0;
  right: 127px;
  z-index: 1;
  
}

.leg {
  bottom: 0;
}

.paw {
  bottom: 100%;
  width: 10px;
  height: 12px;
  transform-origin: bottom center;
  border-radius: 5px;
  background: $color-black;
  
  &:after {
    content: '';
    position: absolute;
    display: block;
    left: 0;
    bottom: 0;
    height: 100%;
    width: 200%;
    background: $color-black;
    border-radius: 100px;
    transform-origin: 5px center;
  }
}  
.log, .hind-log {
  bottom: calc(100% - 5px);
  width: 10px;
  height: 44px;
  transform-origin: bottom center;
  transform: rotate(5deg);
  background: $color-black;
  border-bottom-right-radius: 50% 100%;
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
  
  &:after {
    content: '';
    display: block;
    position: absolute;
    height: 100%;
    width: 75%;
    right: 0;
    background: $color-black;
    transform-origin: right bottom;
    transform: rotate(9deg);
    border-top-right-radius: 8px;
  }
}

.log-inner, .hind-log-inner {
  z-index: 1;
}
.log-inner {
  bottom: calc(100% - 8px);
  width: 15px;
  height: 65px;
  transform-origin: bottom center;
  background-color: $color-fox;
  background-image: linear-gradient(to top,
    $color-black,
    $color-black 10px,
    transparent 11px,
    transparent
  );
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  
  .leg-outer + .leg-outer & {
    &, &:after {
      background-color: $color-fox-dark;
    }
    
    &:before {
      background: radial-gradient(farthest-side at bottom left,
        transparent,
        transparent 99%,
        $color-fox-dark);
    }
  }
  
  &:before, &:after {
    content: '';
    display: block;
    position: absolute;
  }
  &:before {
    right: 100%;
    background: radial-gradient(farthest-side at bottom left,
      transparent,
      transparent 99%,
      $color-fox);
    height: 90%;
    bottom: 0;
    width: 240%;
    border-top-left-radius: 100%;
  }
  &:after {
    right: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    background-color: $color-fox;
    transform-origin: bottom right;
    transform: rotate(15deg);
    border-bottom-left-radius: 50% 100%;
    border-bottom-right-radius: 5px;
    background-image: linear-gradient(-15deg,
      $color-black,
      $color-black 9.5px,
      transparent 9.5px,
      transparent
    );
  }
}
//-------------------------------------
// Les animations
//
.leg-outer {
  animation: a(leg-outer);
  @keyframes leg-outer {
    0%, 100% {
      transform: translateX(0);
    }
    50% {
      transform: translateX(-76px);
    }
  }
}
.leg {
  animation: a(leg);
  
  @keyframes leg {
    75% {
      transform: translateY(-20px);
    }
    from, 40%, to {
      transform: translateY(0);
    }
  }
}

.paw {
  &:after {
    animation: a(paw);
  }
  @keyframes paw {
    10%, to {
      transform: rotate(10deg);
    }
    20%, 40% {
      transform: rotate(10deg);
    }
    70% {
      transform: rotate(120deg);
    }
  }
}


.log {
  animation: a(log);
}

.log-inner {
  animation: a(log-inner);
}


//------------------------------------
body {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background: $color-bg;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

*, *:before, *:after {
  box-sizing: border-box;
  position: relative;
}
              
            
!

JS

              
                /* hover for ❄️ happy holidays! */
              
            
!
999px

Console