cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  font-size: 1vmin;
  background: linear-gradient(to bottom right, white 50%, #eee 50%);
}

.bear {
  position: relative;
  box-sizing: border-box;
  margin: auto;
  height: 40em;
  width: 40em;
  border-radius: 50%;
  filter:
    // Bear Outline
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%));
  background-color: #222; // Nose
  box-shadow:
    // Shadow
    inset -6em 0 rgba(black, 0.1),
    // Head
    inset 0 11em 0 8em darken(SaddleBrown, 10%),
    // Mouth
    inset 0 0 0 15em SaddleBrown, 
    // Right Inner Ear
    -11.5em -16.5em 0 -16.5em mix(white, lighten(SaddleBrown, 15%), 40%),
    // Right Inner Ear Shadow
    -12em -16em 0 -16em mix(white, lighten(SaddleBrown, 15%), 20%),
    // Right Inner Ear
    12.5em -15.5em 0 -16.5em mix(white, lighten(SaddleBrown, 15%), 40%),
    // Right Inner Ear Shadow
    12em -16em 0 -16em mix(white, lighten(SaddleBrown, 15%), 20%),
    // Right Outer Ear
    -12em -16em 0 -14em darken(SaddleBrown, 15%),
    // Left Outer Ear
    12em -16em 0 -14em darken(SaddleBrown, 15%),
    // Nose Shadow
    inset -5em -29em 0 -10em black;
}

.bear::before,
.bear::after {
  content: '';
  display: block;
  border-radius: 50%;
  background-color: transparent;
  position: absolute;
  z-index: 5;
}

.bear::before {
  height: 10em;
  width: 5em;
  top: 7em;
  left: calc(50% - 2.5em);
  box-shadow:
    // Right Eye Reflection
    -6em 0 0 -2em #333,
    // Right Eye Pupil
    -5.5em 0 0 -1em black,
    // Right Eye
    -5.5em 0 0 0 white,
    // Left Eye Refelction
    5em 0 0 -2em #333,
    // Left Eye Pupil
    5.5em 0 0 -1em black,
    // Left Eye
    5.5em 0 0 0 white, 
    // Mouth-Nose Split
    0 15em 0 -2.5em black
  ;
}

.bear::after {
  height: 10em;
  width: 10em;
  top: 29.5em;
  left: calc(50% - 5em);
  box-shadow:
    // Mouth
    0 -1em 0 -0.75em black,
    // Whisker Left Top
    6em -10em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Left Middle
    8em -8em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Left Bottom
    6em -6em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Right Top
    -6em -10em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Right Middle
    -8em -8em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Right Bottom
    -6em -6em 0 -4.75em darken(SaddleBrown, 5%);
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console