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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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 class="background">
  <div class="background__shadow"></div>
  <div class="background__shadow"></div>
  <div class="background__shadow"></div>
</div>

<div class="wrapper" data-lg-mouse>
  <div class="yeti">
    <div class="yeti__horns">
      <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 121.9 176" xml:space="preserve" class="yeti__horn">
    <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-233.5" y1="506.482" x2="-233.616" y2="506.01" gradientTransform="matrix(121.9346 0 0 -175.9843 28540.572 89223.594)">
      <stop offset="0" stop-color="#FFF"/>
      <stop offset="1" stop-color="#D9F5F2"/>
    </linearGradient>
    <path fill="url(#SVGID_1_)" d="M39.7,0c-124,203.4,82.3,174.6,82.3,174.6v-49.9C121.9,124.7,15.3,154.4,39.7,0z"/>
  </svg>
      <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 121.9 176" xml:space="preserve" class="yeti__horn">
    <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-233.5" y1="506.482" x2="-233.616" y2="506.01" gradientTransform="matrix(-121.9346 0 0 -175.9843 -28418.639 89223.594)">
      <stop offset="0" stop-color="#FFF"/>
      <stop offset="1" stop-color="#D9F5F2"/>
    </linearGradient>
    <path fill="url(#SVGID_1_)" d="M0,124.7l0,49.9c0,0,206.2,28.8,82.3-174.6C106.6,154.4,0,124.7,0,124.7z"/>
  </svg>
    </div>

    <div class="yeti__body"></div>

    <div class="yeti__eyes">
      <div class="yeti__eye"></div>
      <div class="yeti__eye"></div>
    </div>

    <div class="yeti__mouth"></div>
  </div>
</div>

<div data-lg-cursor data-lg-cursor-hide>
  <div data-lg-cursor-pointer data-lg-cursor-inertia="0.1"></div>
  <div data-lg-cursor-pointer></div>
  <div data-lg-cursor-trail data-lg-cursor-inertia="0.1"></div>
</div>
              
            
!

CSS

              
                .background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  background-color: #AEFFF7;
  z-index: 1;
  
  &__shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    &:nth-child(1) {
      background: transparent linear-gradient(168deg, #00000000 0%, #000000 100%) 0% 0% no-repeat padding-box;
      mix-blend-mode: soft-light;
      opacity: 0.8;
    }
    
    &:nth-child(2) {
      background: transparent radial-gradient(closest-side at -3% 116%, #000000 0%, #000000A1 42%, #00000000 100%) 0% 0% no-repeat padding-box;
      mix-blend-mode: soft-light;
      opacity: 1;
    }
    
    &:nth-child(3) {
      background: transparent radial-gradient(closest-side at 99% 66%, #000000 0%, #000000C0 28%, #000000A1 42%, #00000000 100%) 0% 0% no-repeat padding-box;
      mix-blend-mode: soft-light;
      opacity: 0.5;
    }
  }
}

.wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.yeti {
  position: absolute;
  bottom: 20%;
  left: calc( 50% - 167px );
  width: 334px;
  height: 466px;
  
  transform: perspective(20em) rotateY(calc( (var(--mouse-progress-x) - 0.5) * 5deg ));  
  z-index: 2;
  
  &:after {
    display: block;
    position: absolute;
    top: calc( 100% - 11px );
    right: -71px;
    left: -71px;
    height: 22px;
    
    background-color: rgba(black, 0.04);
    border-radius: 50%;
    content: '';
  }
  
  &__body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background: transparent linear-gradient(calc( 180deg + (var(--mouse-progress-x) - 0.5) * 60deg ), #FFFFFF 25%, #D9F5F2 75%) 0% 0% no-repeat padding-box;
    border-radius: 999em 999em 0 0;
    z-index: 2;
  }
  
  &__horns {
    transform: perspective(30em) rotateY(calc( (var(--mouse-progress-x) - 0.5) * 10deg ));  
  }
  
  &__horn {
    display: block;
    position: absolute;
    top: 0;
    width: 122px;
    heigh: auto;
    
    z-index: 1;
    
    &:after {
      display: block;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      
      background-color: blue;
      content: '';
    }
    
    &:first-child {
      left: -90px;
    }
    
    &:last-child {
      right: -90px;
    }
  }
  
  &__eyes {
    position: absolute;
    bottom: 61.80%;
    left: calc( 50% - 78px );
    width: 156px;
    height: 80px;
    
    z-index: 3;
  }
  
  &__eye {
    position: absolute;
    bottom: 0;
    width: 75px;
    height: 80px;
    
    background: transparent radial-gradient(ellipse at 50% 82%, #00FFE5 0%, #2CCCBC 100%) 0% 0% no-repeat padding-box;
    border-radius: 999em 999em 0 0;
          
    &:first-child {
      left: 0;
    }
    
    &:last-child {
      right: 0;
    }
    
    &:before,
    &:after {
      display: block;
      position: absolute;
      content: '';
    }
    
    &:before {
      bottom: 5px;
      left: 20px;
      width: 35px;
      height: 35px;
      
      background-color: black;
      border-radius: 50%;
      transform: translate3d(calc( (var(--mouse-progress-x) - 0.5) * 20px ), calc( (var(--mouse-progress-y) - 0.85) * 30px ), 0);
      z-index: 2;
    }
    
    &:after {
      bottom: 6px;
      left: 33px;
      width: 9px;
      height: 12px;
      
      background-color: white;
      border-radius: 50%;
      transform: translate3d(calc( (var(--mouse-progress-x) - 0.5) * 35px ), calc( (var(--mouse-progress-y) - 1) * 45px ), 0);
      z-index: 3;
    }
  }
  
  &__mouth {
    position: absolute;
    bottom: 240px;
    left: 80px;
    width: 174px;
    height: 3px;
    
    background-color: black;
    transform: perspective(20em) rotateY(calc( (var(--mouse-progress-x) - 0.5) * 20deg ));  
    z-index: 3;
    
    &:before,
    &:after {
      display: block;
      position: absolute;
      top: 100%;
      width: 30px;
      height: 12px;
      
      background-color: black;
      border-radius: 0 0 5px 5px;
      content: ''
    }
    
    &:before {
      left: 56px;
    }
    
    &:after {
      right: 56px;
    }
  }
}

.lg-cursor {
  .lg-cursor-pointer {
    &:nth-child(1):before {
      margin: -15px 0 0 -15px;
      width: 30px;
      height: 30px;

      background: rgba(cyan, 0.25);
    }
    &:nth-child(2):before {
      background-color: white;
    }
  }
  
  .lg-cursor-trail {
    path {
      stroke-width: 8px;
    }
  }
}
              
            
!

JS

              
                import WaaarkLuge from "https://cdn.skypack.dev/@waaark/luge@0.6.1-beta";

              
            
!
999px

Console