Skip to content

Instantly share code, notes, and snippets.

@zincplusplus
Created January 10, 2012 13:16
Show Gist options
  • Save zincplusplus/1589036 to your computer and use it in GitHub Desktop.
Save zincplusplus/1589036 to your computer and use it in GitHub Desktop.
Penrose triangle
/**
* Penrose triangle
*/
background:
/* the masks */
linear-gradient(25deg, #1e4a9f 5%, transparent 5%) 48em -35em, linear-gradient(332deg, #1e4a9f 5%, transparent 5%) 47em -90em, linear-gradient(208deg, #1e4a9f 5%, transparent 5%) -44em -92em, linear-gradient(156deg, #1e4a9f 5%, transparent 5%) -42em -40em, linear-gradient(0, #1e4a9f 24%, transparent 15%, transparent 78%, #1e4a9f 76%), linear-gradient(90deg, #1e4a9f 25%, transparent 25%, transparent 75%, #1e4a9f 70%),
/* the shape*/
linear-gradient(-28deg, transparent 83%, #ffa000 83%, #ffa000 88%, transparent 88%) 93em 150em, linear-gradient(225deg, #ffc100 25%, transparent 25%) 0 -66em, linear-gradient(225deg, #fae800 25%, transparent 25%) 0 -84em, linear-gradient(-152deg, transparent 85%, #ffa000 85%, #ffa000 90%, transparent 81%) 93em 138em, linear-gradient(28deg, transparent 80%, #fae800 80%, #fae800 86%, transparent 86%) 154em 52em, linear-gradient(90deg, transparent 82%, #ffc100 82%, #ffc100 90%, transparent 90%) 0em 114em, linear-gradient(-28deg, transparent 83%, #ffc100 83%, #ffc100 89%, transparent 89%) 106em 154em, linear-gradient(90deg, transparent 11%, #fae800 11%, #fae800 20%, transparent 10%) 0 -44em;
background-color: #1e4a9f;
background-size: 200em 200em;
font-size: 1px;
min-height:100%;
<!-- content to be placed inside <body>…</body> -->
{"view":"split-vertical","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment