I wanted to recreated the image from this post: http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/build-an-html-email-template-from-scratch/
Created
July 3, 2016 14:56
-
-
Save Frankie-666/983bbdae895064289b9b62e25da6dd61 to your computer and use it in GitHub Desktop.
CSS Envelope + Letter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- inspired by the image from http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/build-an-html-email-template-from-scratch/ --> | |
<div class="envelope"> | |
<div class="paper"></div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background: #70bbd9; | |
padding: 50px; | |
} | |
.envelope { | |
position: relative; | |
margin: 50px auto 0; | |
width: 98px; | |
height: 66px; | |
background: #c94548; | |
border-radius: 0 0 5px 5px; | |
box-shadow: 0 0 1px #c94548 inset; | |
} | |
.envelope:before, | |
.envelope:after { | |
content: ''; | |
position: absolute; | |
width: 0; | |
height: 0; | |
border: 0 solid transparent; | |
border-width: 33px 49px; | |
} | |
.envelope:before { | |
border-bottom-color: #c94548; | |
top: -100%; | |
left: 0px; | |
} | |
.envelope:after { | |
border-right-color: #ed4c50; | |
border-left-color: #fa565a; | |
border-bottom-color: #fa565a; | |
top: 0; | |
border-radius: 0 0 5px 5px; | |
transform: rotate(360deg); | |
box-shadow: 0 1px 1px rgba(0,0,0,0.25); | |
} | |
.paper { | |
background: #fff; | |
width: 87px; | |
height: 66px; | |
margin: 0 auto; | |
border-radius: 5px; | |
position: absolute; | |
left: 6px; | |
top: -33px; | |
box-shadow: 0 1px 1px rgba(0,0,0,0.25); | |
} | |
.paper:before, | |
.paper:after { | |
content: ''; | |
position: absolute; | |
left: 12px; | |
background: #e3f1fc; | |
height: 4px; | |
border-radius: 5px; | |
} | |
.paper:before { | |
top: 14px; | |
width: 31px; | |
} | |
.paper:after { | |
right: 12px; | |
top: 28px; | |
box-shadow: | |
0 8px 0 #e3f1fc, | |
0 16px 0 #e3f1fc, | |
0 24px 0 #e3f1fc, | |
0 40px 0 #e3f1fc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment