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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div class="dog">
  <div class="body"></div>
  <div class="head"></div>
  <div class="mouth"></div>
</div>
<div class="label">
  <div class="ball"></div>
  Tiki
</div>
              
            
!

CSS

              
                $tan: #BC8A63;
$dgray: #666;

body{
  background:#D1A1AA;
  font-family: 'Gloria Hallelujah', cursive;
}

.label{
  width:300px;
  text-align:center;
  color:#fff;
  font-size:32px;
  margin:-150px auto;
}

.dog{
  width:200px;
  height:280px;
  margin:150px auto auto auto;
  &:hover .body::before, &:active .body::before, &:focus .body::before {
    animation:0.2s wag infinite;
  }
  &:hover .head, &:focus .head{
    background-image: 
      radial-gradient(circle at 50% 81%, rgb(163,66,85) 10%, transparent 1%),
      radial-gradient(circle at 25% 38%, $tan 7%, transparent 1%), 
      radial-gradient(circle at 75% 38%, $tan 7%, transparent 1%),
      radial-gradient(circle at 25% 35%, $dgray 7%, transparent 5%), 
      radial-gradient(circle at 75% 35%, $dgray 7%, transparent 5%),
      radial-gradient(circle at 110% 2%, $tan 40%, transparent 10%), 
      radial-gradient(circle at -10% 2%, $tan 40%, transparent 10%);
  }
  &:hover .head::after, &:hover .head::before, &:focus .head::after, &:focus .head::before{
    margin-top:12px;
  }
  &:hover .mouth, &:focus .mouth{
    margin-top:-50px;
    animation:1s happyyy linear infinite;
  }
}
.head{
  width:100px;
  height:80px;
  border-radius:50%;
  background:#fff;
  margin:auto;
  margin-top:-230px;
  background-image: 
    radial-gradient(circle at 21% 33%, #fff 2%, transparent 1%), 
    radial-gradient(circle at 71% 33%, #fff 2%, transparent 1%),
    radial-gradient(circle at 25% 35%, $dgray 7%, transparent 5%), 
    radial-gradient(circle at 75% 35%, $dgray 7%, transparent 5%),
    radial-gradient(circle at 110% 2%, $tan 40%, transparent 10%), 
    radial-gradient(circle at -10% 2%, $tan 40%, transparent 10%);
  
  //ears
  &::after, &::before{
    content:'';
    position:absolute;
    background:#fff;
  }
  &::after{
    width:28px;
    height:30px;
    background-image: 
      radial-gradient(circle at 130% 35%, $tan 50%, transparent 5%);
    margin:5px 0 0 -15px;
    border-radius: 20% 20% 50% 20%;
    transform: skewX(-10deg) skewY(-10deg);
  }
  &::before{
    width:28px;
    height:30px;
    background-image: 
      radial-gradient(circle at -60% 5%, $tan 50%, transparent 5%);
    margin:5px 0 0 85px;
    border-radius: 20% 20% 20% 50%;
    transform: skewX(10deg) skewY(10deg);
  }
}
.mouth{
  width:40px;
  height:35px;
  border-radius:50%;
  background:$tan;
  margin:auto;
  margin-top:-40px;
  z-index:20;
  background-image: 
    radial-gradient(circle at 50% 35%, $dgray 17%, transparent 5%);
  &::after{
    content:'';
    position:absolute;
    width:20px;
    height:12px;
    border-radius:50%;
    background:$dgray;
    background-image: 
      radial-gradient(circle at 12% 33%, #fff 10%, transparent 1%);
    margin:2px 0 0 10px;
  }
}
.body{
  width:100px;
  height:170px;
  background:#fff;
  margin:auto;
  border-radius:40% 40% 10% 10%;
  margin-top:100px;
  &::before{
    content:'';
    position:absolute;
    width:170px;
    height:170px;
    background:#fff;
    border-radius:50%;
    z-index:-2;
    background-image: 
      radial-gradient(circle at 40% 32%, #D1A1AA 70%, transparent 5%);
    animation:1s wag infinite;
  }
  
}

@keyframes wag{
  0%, 100%{
    transform:rotate(0deg) translateX(20px);
  }
  50%{
    transform:rotate(-20deg);
  }
}

@keyframes happyyy{
  0%, 100%{
    margin-top:-50px;
  }
  50%{
    margin-top:-52px;
  }
}

.ball{
  height:40px;
  width:40px;
  border-radius:50%;
  background:#5CB300;
  background-image: 
    radial-gradient(circle at 10% 32%, #5CB300 30%, transparent 5%),
    radial-gradient(circle at 20% 32%, rgba(255,255,255,0.7) 30%, transparent 5%);
  position:relative;
  margin:0px 300px auto auto;
  animation:2s roll ease alternate infinite;
}

@keyframes roll{
  0%,100%{
    margin-left:0px;
  }
  50%{
    margin-left:-40px;
    transform:rotate(-40deg);
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console