cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

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 {
  display: flex;
  margin: 0;
  font-size: 1vmin;
  background: linear-gradient(to bottom right, white 50%, #eee 50%);
}

$grey: mix(#aaa, dodgerblue, 95%);
$red: darken(#d01010, 10%);

.elephant {
  position: relative;
  margin: auto;
  width: 50em;
  height: 50em;
  border: 0.5em solid darken($grey, 15%);
  border-radius: 50%;
  background:
    // Right Eye
    radial-gradient(50% 50%, #333 0.875em, rgba(#333,0) 1em) -6.75em -5.75em,
    radial-gradient(50% 50%, black 2.375em, rgba(black,0) 2.5em) -6em -5.25em,
    radial-gradient(50% 60%, white 2.875em, white 4em, darken($grey, 30%) 4.0625em, darken($grey, 30%) 4.25em, rgba(darken($grey, 30%), 0) 4.375em) -6em -7.5em,
    // Left Eye
    radial-gradient(50% 50%, #333 0.875em, rgba(#333,0) 1em) 5.25em -5.75em,
    radial-gradient(50% 50%, black 2.375em, rgba(black,0) 2.5em) 6em -5.25em,
    radial-gradient(50% 60%, white 2.875em, white 4em, darken($grey, 30%) 4.0625em, darken($grey, 30%) 4.25em, rgba(darken($grey, 30%), 0) 4.375em) 6em -7.5em,
    // Mouth
    radial-gradient(80% 50%, $grey 15.9em, rgba($grey,0) 16em) 0 0.5em,
    radial-gradient(50% 50%, rgba(darken($grey, 45%),0) 11.9em, darken($grey, 45%) 12em, darken($grey, 45%) 12.25em, $grey 12.3em) 0 9em,
    radial-gradient(50% 50%, $red 15.9em, rgba($red,0) 16em) -10em 30em,
    radial-gradient(60% 50%, darken($red, 10%) 15.9em, rgba(darken($red, 10%),0) 16em) -10em 27.5em,
    radial-gradient(50% 50%, darken($red, 2%) 15.9em, rgba(darken($red, 2%),0) 16em) -4em 30.5em,
    linear-gradient(to top, black 18em, rgba(black,0) 18em),
    $grey;

  box-shadow:
    // Head Shadow
    inset 2em 1em 0 -0.5em lighten($grey, 5%),
    inset -4em -2em darken($grey, 5%),
    // Right Ear
    -17.5em 10em 0 -6em darken($grey, 5%),
    -17.5em -6em 0 -1.5em darken($grey, 5%),
    -17em -5em 0 -1em darken($grey, 5%),
    -16em -4em 0 -1em darken($grey, 5%),
    -15em -3em 0 -1em darken($grey, 5%),
    -18em 10em 0 -6em lighten($grey, 5%),
    -18em -6em 0 -1em lighten($grey, 5%),
    -17em -5em 0 -1em lighten($grey, 5%),
    -16em -4em 0 -1em lighten($grey, 5%),
    -15em -3em 0 -1em lighten($grey, 5%),
    // Left Ear
    17.5em 10em 0 -6em darken($grey, 8%),
    17.5em -6em 0 -1.5em darken($grey, 8%),
    16em -4em 0 -1em darken($grey, 8%),
    15em -3em 0 -1em darken($grey, 8%),
    18em 10em 0 -6em darken($grey, 14%),
    18em -6em 0 -1em darken($grey, 14%),
    17em -5em 0 -1em darken($grey, 14%),
    16em -4em 0 -1em darken($grey, 14%),
    15em -3em 0 -1em darken($grey, 14%)
    ;
}

.elephant::before,
.elephant::after {
  content: '';
  display: block;
  position: absolute;
}

// Trunk Base
.elephant::before {
  height: 20em;
  width: 30em;
  top: calc(50% - 3.9em);
  left: calc(50% + 1.5em);
  border-radius: 0 30em 0 0;
  border-top: 14em solid darken($grey, 15%);
  border-right: 10em solid darken($grey, 15%);
  transform-origin: 0 0;
  transform: rotate(20deg);
}

.elephant::after {
  height: 14em;
  width: 14em;
  border-radius: 50%;
  top: calc(50% - 4em);
  left: calc(50% - 7em);
  background-color: darken($grey, 15%);
  box-shadow:
    22.675em 37.25em 0 -2em darken($grey, 15%);
}
            
          
!
999px
Loading ..................

Console