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.

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

              
                .artboard
  - for (var x = 0; x < 2; x++)
    .cloud 
      - for (var j = 0; j < 4; j++)
        span
        
  - for (var a = 0; a < 3; a++)
    .bird 
      .wing
      .wing

  .land
    .up
      .tree
        .trunk
      .house  
        .shadow
        .door
        - for (var s = 0; s < 3; s++)
          .smoke
      - for (var b = 0; b < 2; b++)
        .bunny
          .head
      .heart
      .mail 
        span
    .down
    
  .text
    p Our #[span H]appy Place 
              
            
!

CSS

              
                // FONTS
@import url('https://fonts.googleapis.com/css?family=Sevillana');
$font-primary: 'Sevillana', cursive;

// Sky
$sky: #84D6E2;
$white: #fff;
$cloud: $white;
$light-grey: #f2f2f2;
$black: #000;
// Island
$island-size: 300px;
$island-terrain: #AA9581;
$grass: #B6D791;
// House
$dark-blue: #4f8088;
// Rainbow
$peach: #FFC09F;
$yellow: #FFEE93;
$green: #ADF7B6;
$blue: #83B2DB;
$purple: #E2A7DC;
$red: #eb6868;

// GENERAL

*, *::before, *::after{
  box-sizing: border-box;
}
html,body{
  height: 100%;
}
body{
  background: $sky;
  background-image: linear-gradient(top, $sky, $sky 50%, lighten($purple, 10%));
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
}


// DRAWING STYLES

.artboard{
  position: relative;
  width: 400px;
  height: 400px;
}

.cloud{
  position: absolute;
  top: 0;
  left: -50px;
  width: 243px;
  height: 70px;
  animation: wind-right 7s linear infinite alternate;
  &::before{
    position: absolute;
    content: '';
    z-index: 1;
    top: 37px;
    left: 0;
    width: 100%;
    height: 33px;
    background: $sky;
  }
  span{
    position: absolute;
    top: 0;
    left: 0;
    background: $cloud;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    &:nth-child(2){
      transform: scale(1.4);
      top: -30px;
      left: 70px;
    }
    &:nth-child(3){
      top: -10px;
      left: 140px;
    }
    &:nth-child(4){
      transform: scale(.5);
      top: 0px;
      left: 190px;
    }
  }
  transform: scale(.4);
  &:nth-child(2){
    top: 3rem;
    left: auto;
    right: -50px;
    transform: scale(.4) rotateY(180deg);
    animation: wind-left 7s linear infinite alternate;
  }
}

@keyframes wind-right{
  from{
    transform: scale(.6) translateX(0);
  }
  to{
    transform: scale(.65) translateX(20px);
  }
}
@keyframes wind-left{
  from{
    transform: scale(.6) rotateY(180deg) translateX(0);
  }
  to{
    transform: scale(.65) rotateY(180deg) translateX(20px);
  }
}

.bird{
  z-index: 9;
  position: absolute;
  top: 100px;
  left: 40px;
  transform: rotate(-20deg) scale(.8);
  &:nth-child(4){
    top: 130px;
    left: 85px;
    transform: rotate(0deg);
  }
  &:nth-child(5){
    top: 192px;
    left: 60px;
    transform: rotate(0deg) scale(.6);
  }
  .wing{
    position: absolute;
    top: 0;
    left: 0;
    width: 7px;
    height: 22px;
    background: #000;
    border-radius: 50%;
    transform-origin: bottom center;
    transform: rotate(-35deg);
    background: $white;
    overflow: hidden;
    &::before{
      position: absolute;
      top: 0;
      left: 0;
      content:'';
      width: 7px;
      height: 7px;
      background: $blue;
    }
    &:last-of-type{
      transform: rotate(35deg);
    }
  }
}

.land{
  position: relative;
  margin: 100px auto;
  width: $island-size;
  height: $island-size;
  .up{
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    width: $island-size;
    height: $island-size / 2;
    &::before{
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: $island-size;
      height: $island-size;
      border-radius: 50%;  
      box-shadow: inset 0 0 0 10px $peach,
                  inset 0 0 0 20px $yellow,
                  inset 0 0 0 30px $green,
                  inset 0 0 0 40px $blue,
                  inset 0 0 0 50px $purple;
      animation: shine 4s linear infinite;
    }
    &::after{
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 15px;
      background: $grass;
      border-radius: 50% 50% 0 0;
    }
    
    .tree{
      position: absolute;
      bottom: 50px;
      right: 0;
      width: 80px;
      height: 80px;
      background: darken($grass, 5%); 
      border-radius: 50%;
      &::before, &::after{
        position: absolute;
        content: '';
      }
      &::before{
        top: 2px;
        left: 1px;
        width: 86%;
        height: 86%;
        background: rgba($white, .2);
        border-radius: 50%;
        transform-origin: top left;
      }
      &::after{
        top: 30px;
        left: 12px;
        width: 7px;
        height: 7px;
        background: darken($grass, 5%);
        border-radius: 50%;
        box-shadow: 10px -12px 0 2px darken($grass, 5%);
      }
      .trunk{
        position: absolute;
        top: 73px;
        left: 50%;
        transform: translateX(-50%);
        width: 8px;
        height: 50px;
        background: $island-terrain;
        border-radius: 5px 5px 0 0;
      }
    }
  
    .house{
      position: absolute;
      bottom: 0;
      left: 60%;
      transform: translateX(-50%);
      width: 60px;
      height: 35px;
      background: $white;
      &::before, &::after{
        content: '';
        position: absolute;
        transform: translateX(-50%);
      }
      &::before{
        top: -80px;
        left: 50%;
        border: 40px solid transparent;
        border-bottom-color: $dark-blue;
      }
      &::after{
        top: -60px;
        left: 50%;
        border: 30px solid transparent;
        border-bottom-color: rgba($white, .90);
      }
      .shadow{
        z-index: 5;
        position: absolute;
        top: 0;
        left: 0;
        border-top: 7px solid rgba($black,.05);
        border-left: 30px solid rgba($black,.05);
        border-right: 30px solid transparent;
        border-bottom: 7px solid transparent;
      }
      .door{
        z-index: 2;
        position: absolute;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 12px;
        height: 15px;
        background: $dark-blue;
        &::before, &::after{
          position: absolute;
          content: '';
        }
        &::before{
          width: 7px;
          height: 7px;
          left: -12px;
          background: $dark-blue;
        }
        &::after{
          width: 5px;
          height: 12px;
          top: -32px;
          right: -15px;
          background: $dark-blue;
        }
      }
      .smoke{
        position: absolute;
        top: -26px;
        right: 9px;
        width: 5px;
        height: 5px;
        background: $light-grey;
        border-radius: 50%;
        animation: smoker 14s linear infinite;
        &:nth-child(3){
          animation-delay: .5s;
        }
        &:nth-child(4){
          animation-delay: 1s;
        }
      }
    }
    
    .bunny{
      position: absolute;
      bottom: 10px;
      left: 100px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: $blue;
      transform: scale(.5);
      &::before, &::after{
        content: '';
        position: absolute;
      }
      &::before{
        bottom: 0;
        right: -4px;
        width: 9px;
        height: 9px;
        background: $blue;
        border-radius: 50%;
      }
      &::after{
        bottom: 0;
        right: 5px;
        width: 20px;
        height: 5px;
        background: $blue;
        border-radius: 16px 50% 50% 0;
      }
      .head{
        position: absolute;
        top: -4px; 
        left: -6px;
        width: 12px;
        height: 12px;
        background: $blue;
        border-radius: 6px 6px 3px 2px;
        &::before{
          content:'';
          position: absolute;
          bottom: 0;
          right: -2px;
          width: 6px;
          height: 20px;
          background: $blue;
          border-radius: 0 100% 0 0;
          transform: rotate(45deg);
        }
      }
      &:nth-child(4){
        left: 77px;
        transform: scale(.5) rotateY(180deg);
      }
    }
    
    .heart{
      position: absolute;
      bottom: 30px;
      left: 94px;
      width: 10px;
      height: 10px;
      background: $red;
      transform: rotate(-45deg) scale(.4);
      animation: love 1s linear infinite alternate;
      &::before, &::after{
        content: '';
        position: absolute;
        top: -5px;
        width: 10px;
        height: 10px;
        background: $red;
        border-radius: 50%;
      }
      &::before{
        top: -5px;
        left: 0px;
      }
      &::after{
        top: 0;
        left: 5px;
      }
    }
    
    .mail{
      position: absolute;
      bottom: 22px;
      left: 25px;
      &::before{
        content: 'welcome';
        z-index: 1;
        position: absolute;
        bottom: 0px;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 18px;
        line-height: 18px;
        font-family: $font-primary;
        text-align: center;
        font-size: 12px;
        color: $blue;
        background: $white;
        border-radius: 2px;
      }
      &::after, span{
        z-index: 0;
        content: '';
        position: absolute;
        top: -22px;
        left: 10px;
        width: 4px;
        height: 35px;
        background: darken($light-grey, 50%);
        border-radius: 2px 2px 0 0;
      }
      span{
        left: -15px;
      }
    }
  }
  .down{
    position: absolute;
    top: 50%;
    left: 0;
    overflow: hidden;
    width: $island-size;
    height: $island-size / 2;
    &::before{
      content: '';
      position: absolute;
      top: -$island-size / 2;
      left: 0;
      width: $island-size;
      height: $island-size;
      background: $island-terrain;
      border-radius: 50%;  
    }
    &::after{
      content: '';
      position: absolute;
      width: 100%;
      height: 15px;
      background-color: $grass;
      background: 
      linear-gradient(115deg, transparent 75%, $island-terrain 75%) 0 0,
      linear-gradient(245deg, transparent 75%, $island-terrain 75%) 0 0,
      linear-gradient(115deg, transparent 75%, $island-terrain 75%) 7px -15px,
      linear-gradient(245deg, transparent 75%, $island-terrain 75%) 7px -15px,
      $grass;
      background-size: 15px 30px;
    }
  } 
}

@keyframes shine{
  84%{
    -webkit-filter: blur(0);
  filter: blur(0);
  }
  88%{
    -webkit-filter: blur(3px);
  filter: blur(3px);
  }
  92%{
    -webkit-filter: blur(0);
  filter: blur(0);
  }
  96%{
    -webkit-filter: blur(3px);
  filter: blur(3px);
  }
  100%{
    -webkit-filter: blur(0);
  filter: blur(0);
  }
}
@keyframes smoker{
  0%{
    opacity: .65;
    transform: scale(1) translateY(0);
  }
  5%{
    transform: scale(1);
  }
  30%, 100%{
    opacity: 0;
    transform: scale(5) translateY(-10px);
  }
}
@keyframes love{
  from{
    transform: rotate(-45deg) scale(.4);
  }
  to{
    transform: rotate(-45deg) scale(.6);
  }
}



.text{
  position: absolute;
  bottom: 3.5rem;
  left: 0;
  width: 100%;
  p{
    margin: 0;
    font-family: $font-primary;
    text-align: center;
    font-size: 3.25em;
    line-height: 1;
    color: $light-grey;
    span{
      animation: blink 5s linear infinite alternate;
    }
  }
}

@keyframes blink{
  0%{
    opacity: 1;
  }
  2%{
    opacity: 0;
  }
  4%{
    opacity: 1;
  }
  96%{
    opacity: 1;
  }
  98%{
    opacity: 0;
  }
  100%{
    opacity: 1;
  }
}
              
            
!

JS

              
                /***************************

Dream big dreams.
Small dreams have no magic.

--Dottie Boreyko

 ***************************/
              
            
!
999px

Console