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 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.

            
              <div class="container">
    <div class="shadow"></div>
  <div class="mug"></div>
  <div class="cat">
    <ul class="eyes">
      <li></li>
      <li></li>
    </ul>
    <div class="mouth"></div>
  </div>
</div>

            
          
!
            
              $mug1: #f4bbac;
$mug2: #f1dfcb;
$cat: #999;
$shadow: #a9a7a5;

body {
  background-color: #eee;
}

.container {
  position: absolute;
  left: 50%;
  margin-left: -50px;
  top: 50%;
  margin-top: -40px;
}

.mug {
  position: absolute;
  width: 92px;
  height: 80px;
  background: repeating-linear-gradient(
  70deg,
  $mug1,
  $mug1 10px,
  $mug2 10px,
  $mug2 20px
);
  border-radius: 20px 20px 50px 50px;
  border: 4px solid $mug1;
  
  &:after {
    content: "";
    position: absolute;
    width: 30px;
    height: 25px;
    border: 10px solid $mug1;
    border-radius: 100%;
    right: -28px;
    top: 10px;
    z-index: -1;
  }
}

.cat {
  width: 90px;
  height: 55px;
  background-color: $cat;
  position: absolute;
  border-radius: 250px 250px 120px 120px;
  left: 5px;
  top: -30px;
  box-shadow: 0px 6px 0px 1px rgba(244,187,172,1);
  z-index: 2;
  
  &:after, &:before {
  content: "";
  position: absolute;
	width: 0; 
	height: 0; 
	border-left: 18px solid transparent;
	border-right: 18px solid transparent;
	border-bottom: 25px solid $cat;
  top: -10px;
  }
  &:after {
    transform: rotate(-35deg);
  }
  &:before {
    transform: rotate(35deg);
    right: 0;
  }
}

.eyes li {
  position: absolute;
  list-style: none;
  float: left;
  width: 6px;
  height: 6px;
  background-color: #fff;
  border: 2px solid black;
  border-radius: 100%;
  
  &:first-child{
    right: 25px;
  }
  &:nth-child(2){
    left: 25px;
  }
  
  &:after {
    content: "";
    position: absolute;
    height: 4px;
    width: 2px;
    background-color: black;
    top: -4px;
    left: -2px;
    transform: rotate(120deg);
  }
}

.mouth {
  position: absolute;
  left: 40px;
  top: 28px;
  
  &:after, &:before{
    content: "";
    position: absolute;
    width: 2px;
    height: 8px;
    background-color: black;
    transform: rotate(-55deg);
  }
  &:after {
    transform: rotate(55deg);
    right: -8px;
  }
}

.shadow {
  width: 90px;
  height: 30px;
  border-radius: 100%;
  background-color: $shadow;
  position: absolute;
  top: 70px;
  left: 6px;
  opacity: 0.5;
}
            
          
!
999px
Loading ..................

Console