<div class="container">
<div class="envelope">
<div class="paper">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div class="noti">1</div>
</div>
</div>
<div class="open"></div>
<a href="javascript:">Open</a>
</div>
* {
box-sizing: border-box;
}
html {
background: #444444;
}
.container {
width: 130px;
margin: 20px auto;
text-align: center;
position: relative;
}
.envelope {
background: #ca336d;
width: 100%;
height: 80px;
position: relative;
box-shadow: 0 5px 0 #3a3d3c;
margin: 85px 0 30px 0;
z-index: 1;
}
.envelope:before,
.envelope:after {
content: "";
position: absolute;
bottom: 0;
}
.envelope:before {
right: 0;
border-bottom: 0px solid transparent;
border-top: 80px solid transparent;
border-right: 130px solid #dc447f;
z-index: 1;
}
.envelope:after {
left: 0;
border-bottom: 0px solid transparent;
border-top: 80px solid transparent;
border-left: 130px solid #ea4c89;
z-index: 1;
}
.open {
border-right: 65px solid transparent;
border-top: 40px solid #c8336c;
border-left: 65px solid transparent;
position: absolute;
z-index: 9999;
left: 0;
top: 0;
transform-origin: 0% 0%;
}
.paper {
width: 110px;
height: 75px;
position: absolute;
bottom: 0;
left: 50%;
margin-left: -55px;
background: #f2f2f2;
z-index: 0;
}
.paper:before {
content: "";
position: absolute;
}
.paper:before {
width: 110px;
height: 75px;
background: rgba(177,177,177,0.1);
bottom: 0;
left: 0;
}
.noti {
position: absolute;
top: -15px;
right: -15px;
width: 35px;
height: 35px;
border-radius: 35px;
color: #fff;
font: bold 20px/36px "Helvetica";
text-align: center;
background: #2ecc71;
box-shadow: 0 4px 0 rgba(216,217,216, 0.7);
opacity: 0;
}
ul {
margin: 25px auto 0 auto;
padding: 0;
display: block;
width: 80%;
}
li {
list-style: none;
background: #d3d3d3;
width: 100%;
height: 5px;
margin-bottom: 5px;
}
li:nth-child(1) {
width: 50%;
}
li:nth-child(2) {
margin-bottom: 20px;
width: 20%;
}
a {
background: #878387;
text-decoration: none;
text-transform: uppercase;
color: #fff;
letter-spacing: 1px;
font: bold 13px "helvetica";
padding: 8px 15px;
box-shadow: 0 3px 0 #2a2c2b;
}
a:active,
a:hover {
box-shadow: 0 1px 0 #2a2c2b;
}
/* TRIGGER ANIMATIONS */
.is-active .open {
animation: foldUp 1s ease-in-out;
animation-fill-mode: forwards;
}
.is-active .paper {
animation: paperUp 1.5s ease-in-out;
animation-fill-mode: forwards;
animation-delay: 1s; /* W3C and Opera */
}
.is-active .noti {
animation: noti 0.5s ease-in-out;
animation-fill-mode: forwards;
animation-delay: 2s; /* W3C and Opera */
}
/* ANIMATIONS */
@keyframes foldUp {
from {
transform: rotateX(0deg);
}
to {
transform:rotateX(180deg);
z-index: 0;
}
}
@keyframes noti {
from {
opacity: 0;
} to {
opacity: 1;
}
}
@keyframes paperUp {
from {
height: 75px;
} 60% {
height: 130px;
} 70% {
height: 110px;
} 80% {
height: 130px;
} 90% {
height: 120px;
} 100% {
height: 130px;
}
}
/* IDEA FOR ICON FROM HERE -> http://dribbble.com/shots/1003867-Dribbble-Invitation?list=popular&offset=2 */
/* Trigger Animation */
$('a').on('click', function() {
$('.container').addClass('is-active');
$(this).remove();
});
This Pen doesn't use any external CSS resources.