Skip to content

Instantly share code, notes, and snippets.

@mischah
Created January 30, 2015 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mischah/6de338dbc0c49da75cf6 to your computer and use it in GitHub Desktop.
Save mischah/6de338dbc0c49da75cf6 to your computer and use it in GitHub Desktop.
Simple folded corners
/**
* 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;
}
<div>Look at my cool folded corner.
It only took two lines of CSS, degrades gracefully and works everywhere!</div>
// alert('Hello world!');
{"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