<div id="wrapper">
  
  <div id="reset">Reset</div>
  
  <div class="envelope open">
    <div class="flap front"></div>
    <div class="flap top"></div>
    <div class="letter"></div>
  </div>
  
</div>
* {
  box-sizing: border-box;
}

#wrapper {
  width: 400px;
  margin: 0 auto;
}

.envelope {
  width: 200px;
  height: 100px;
  margin: 130px auto 0;
  background: #ddd;
  box-shadow: 
    0 0 1px rgba(0,0,0,0.5),
    0 1px 3px rgba(0,0,0,0.25);
  position: relative;
  perspective: 800px;
}
.envelope:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border: 0 solid rgba(0,0,0,0.25);
  border-width: 45px 100px;
  border-top-color: transparent;
  z-index: 2;
}

.envelope .flap {
  position: absolute;
  width: 100%;
  height: 0;
  border: 0 solid transparent;
  border-width: 50px 100px;
  z-index: 3;
}
.envelope .flap.front {
  border-left-color: #eee;
  border-right-color: #eee;
  border-bottom-color: #ccc;
  z-index: 3;
}
.envelope .flap.front:after {
  content: '';
  width: 100%;
  height: 0;
  position: absolute;
  left: -100px;
  bottom: -50px;
  border: 0 solid transparent;
  border-width: 49px 100px;
  border-bottom-color: #eee;
}

.envelope .flap.top {
  border-top-width: 55px;
  border-top-color: #aaa;
  z-index: 3;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  -webkit-transform-origin-y: top;
  transform-origin-y: top;
  perspective: 800;
  transform-style: preserve-3d;
}
.envelope.open .flap.top {
  animation-name: flip;
}
.envelope .flap.top:after {
  content: '';
  position: absolute;
  left: -100px; /* border-left-width */
  top: -55px; /* border-top-width */
  width: 100%;
  height: 0;
  border: 0 solid transparent;
  border-width: 54px 100px;
  border-top-color: #eee;
}

.envelope .letter {
  position: absolute;
  width: 194px;
  height: 84px;
  background: #fff;
  top: 8px;
  left: 3px;
  border: 1px solid #ccc;
  z-index: 1;
  animation-duration: 2s;
  animation-delay: 1.5s;
  animation-fill-mode: forwards;
  transform-style: preserve-3d;
}
.envelope.open .letter {
  animation-name: remove;
}
.envelope .letter:before,
.envelope .letter:after {
  content: '';
  position: absolute;
  width: 192px;
  height: 75%;
  left: -1px;
  background: #fff;
  border: 1px solid #ccc;
  animation-duration: 1s;
  animation-delay: 4s;
  animation-fill-mode: forwards;
  -webkit-transform-origin-y: top;
  transform-origin-y: top;
  transform-style: preserve-3d;
  transform: rotateX(10deg);
}
.envelope .letter:before {
  z-index: 1;
}
.envelope.open .letter:before {
  animation-name: fold-up;
}
.envelope .letter:after {
  animation-delay: 5s;
  animation-fill-mode: forwards;
  -webkit-transform-origin-y: bottom;
  transform-origin-y: bottom;
  transform: rotateX(-5deg);
  bottom: 0;
}
.envelope.open .letter:after {
  animation-name: fold-down;
}

@keyframes flip {
  100% {
    transform: rotateX(180deg);
    z-index: 1;
  }
}

@keyframes remove {
  50% {
    top: -120px;
  }
  100% {
    top: 8px;
    z-index: 3;
  }
}

@keyframes fold-up {
  from {
  }
  to {
    transform: rotateX(140deg);
  }
}

@keyframes fold-down {
  from {
  }
  to {
    transform: rotateX(-140deg);
  }
}

#reset {
  background: #eee;
  display: inline-block;
  margin-top: -100px;
  text-align: center;
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: 25px;
  background: linear-gradient(#eee, #ccc);
  color: #333;
  text-shadow: 0 1px 0 #fff;
  cursor: pointer;
  float: right;
}
#reset:hover {
  opacity: 0.8;
}
#reset:active {
  background: linear-gradient(#ccc, #eee);
}
$(document).ready(function() {
  
  $('#reset').click(function() {
    $('.envelope').removeClass('open');
    setTimeout(function() {
      $('.envelope').addClass('open');
    }, 500);
  });
  
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js