Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                 <div class="wing right"></div>
    <div class="wing left"></div>
     <div class="heart"></div>
        <div id="envelope">
       
  <div class="top"></div>
  
  <div class="sides"></div>
</div>
              
            
!

CSS

              
                 body {
        margin:0;
        background:mistyrose;
    }

/* wings */

.wing {
    background:white;
     border-radius: 12px 20px 60px 20px;
     width:120px;
     height:50px; margin-top:80px;
     position:absolute;
}

/* right wing */

.right {
    margin-left:-60px;
    left:50%;
    animation:flap1 1s infinite;
    border-bottom:3px solid rgba(0,0,0,.08);
     border-radius: 12px 20px 60px 20px;
    transform:rotate(-10deg) translate(250px,0);
}

@keyframes flap1 {
    0% {
        transform:rotate(-10deg) translate(250px,0);
    }
    
    50% {
        transform:rotate(-5deg) translate(250px,0);
    }
}
.right:before {
    position:absolute;
    content:'';
    background:white;
    width:70%;
    height:70%;
       border-bottom:3px solid rgba(0,0,0,.08);
    border-radius: 20px 20px 60px 20px;
    transform:rotate(20deg) translate(-1px,0);
    margin-top:38px;
}

.right:after {
      position:absolute;
    content:'';
    background:white;
    width:40%;
    transform:rotate(29deg) translate(-8px,0);
    height:30%;
       border-bottom:3px solid rgba(0,0,0,.08);
    border-radius: 0px 0px 60px 70px;
    margin-top:66px;
}

/* left wing */

.left {
    border-radius:12px 20px 20px 60px;
     margin-left:-60px;
    left:50%;
     animation:flap2 1s infinite;
      border-bottom:3px solid rgba(0,0,0,.08);
    transform:rotate(10deg) translate(-248px, 0);
}

@keyframes flap2 {
    0% {
        transform:rotate(10deg) translate(-248px,0);
    }
    
    50% {
        transform:rotate(5deg) translate(-248px,0);
    }
}


.left:before {
    position:absolute;
    content:'';
    background:white;
    width:70%;
       border-bottom:3px solid rgba(0,0,0,.08);
    transform:translate(46%,0) rotate(-20deg);
    height:60%;
      border-radius:12px 20px 70px 70px;
    margin-top:40px;
}

.left:after {
      position:absolute;
    content:'';
    background:white;
    width:40%;
       border-bottom:3px solid rgba(0,0,0,.08);
    height:30%;
     transform:translate(164%,0) rotate(-34deg);
     border-radius:0px 0px 70px 60px;
    margin-top:58px;
}

/* heart */

.heart{
    position: absolute;
    width: 120px;
    z-index:99999;
    height: 100px;
    margin-left:-50px;
    left:50%;
     animation: heart 1s infinite;
    transform:scale(.8);
    transition:.6s;
    margin-top:60px;
    
}
.heart:before,
.heart:after{
    content: "";
    width: 50px;
    height: 80px;
    position: absolute;
    left: 50px;
    top: 0;
    border-radius: 50px 50px 6px 6px;
    background: crimson;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}
.heart:after{
    left: 0;
    transform: rotate(45deg);
    transform-origin :100% 100%;
}

@keyframes heart {
    0% {
        transform: scale(.8) translate(0,0);
    }
    
    50% {
        transform: scale(.92) translate(0, 12px);
    }
    
    100% {
        transform:scale(.8);
    }
}

/* envelope */

  #envelope {
  background: white; 
  margin: 200px auto;
  height: 200px;
  position: relative;
  width: 320px;
  border-radius:8px;
  overflow:hidden;
  animation: floaty 1s infinite;
}

@keyframes floaty {
    0% {
        transform:translate(0,0);
    }
    
    50% {
        transform:translate(0, 12px);
    }
}

/* bottom, left, and right sides */
.sides {
  border-color: transparent #fbfbfb #f7f7f7 #fcfcfc;
  border-style: solid;
  border-width: 90px 170px;
  bottom: 0;
  height: 0;
  left: 0;
  position: absolute;
  width: 0;
}

/* top side */

.top {
  border-color: white transparent transparent;
  border-style: solid;
  border-width: 108px 140px 90px 140px;
  height: 0;
  left: 0;
  position: absolute;
  top: 0;
  transform-origin: 50% 0;
  width: 0;
}


              
            
!

JS

              
                
              
            
!
999px

Console