Created
January 30, 2015 07:49
-
-
Save mischah/6de338dbc0c49da75cf6 to your computer and use it in GitHub Desktop.
Simple folded corners
This file contains 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
/** | |
* Simple folded corners | |
*/ | |
div { | |
background: yellowgreen; /* fallback */ | |
padding: 1em; | |
width: 12em; | |
margin: 1em; | |
font: 150%/1.6 Baskerville, Palatino, serif; | |
} | |
body { | |
/* Showcase that the effect supports any backdrop */ | |
background: repeating-linear-gradient(-45deg, #ddd 0, #ddd 25%, white 0, white 50%) 0 / 6px 6px; | |
box-sizing: border-box; | |
padding: 1em; | |
height: 100vh; | |
} |
This file contains 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
<div>Look at my cool folded corner. | |
It only took two lines of CSS, degrades gracefully and works everywhere!</div> |
This file contains 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
// alert('Hello world!'); |
This file contains 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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment