Created
February 19, 2013 00:47
-
-
Save bahaddinyasar/4982104 to your computer and use it in GitHub Desktop.
Pure CSS Folded Corner Effect
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
.note { | |
position:relative; | |
width:30%; | |
padding:1em 1.5em; | |
margin:2em auto; | |
color:#fff; | |
background:#97C02F; | |
overflow:hidden; | |
} | |
.note:before { | |
content:""; | |
position:absolute; | |
top:0; | |
right:0; | |
border-width:0 16px 16px 0; | |
border-style:solid; | |
border-color:#fff #fff #658E15 #658E15; | |
background:#658E15; | |
-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.3), -1px 1px 1px rgba(0,0,0,0.2); | |
-moz-box-shadow:0 1px 1px rgba(0,0,0,0.3), -1px 1px 1px rgba(0,0,0,0.2); | |
box-shadow:0 1px 1px rgba(0,0,0,0.3), -1px 1px 1px rgba(0,0,0,0.2); | |
display:block; width:0; /* Firefox 3.0 damage limitation */ | |
} | |
.note.rounded { | |
-webkit-border-radius:5px 0 5px 5px; | |
-moz-border-radius:5px 0 5px 5px; | |
border-radius:5px 0 5px 5px; | |
} | |
.note.rounded:before { | |
border-width:8px; | |
border-color:#fff #fff transparent transparent; | |
-webkit-border-bottom-left-radius:5px; | |
-moz-border-radius:0 0 0 5px; | |
border-radius:0 0 0 5px; | |
} | |
/* Ref: http://nicolasgallagher.com/pure-css-folded-corner-effect/ | |
Demo: http://nicolasgallagher.com/pure-css-folded-corner-effect/demo/ | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment