Skip to content

Instantly share code, notes, and snippets.

@kaspereden
Created July 20, 2015 10:45
Show Gist options
  • Save kaspereden/8a3779677c46b7c3b1ab to your computer and use it in GitHub Desktop.
Save kaspereden/8a3779677c46b7c3b1ab to your computer and use it in GitHub Desktop.
Center the demo
div {
width: 280px;
height: 280px;
background: #1e90ff;
-webkit-clip-path: polygon(100% 51%, 96% 40%, 89% 29%, 80% 21%, 69% 13%, 57% 6%, 45% 3%, 30% 9%, 19% 14%, 8% 24%, 2% 34%, 0% 49%, 0% 62%, 4% 73%, 13% 84%, 24% 91%, 33% 97%, 44% 99%, 46% 89%, 55% 87%, 65% 86%, 76% 82%, 84% 75%, 92% 67%, 98% 58%);
clip-path: polygon(100% 51%, 96% 40%, 89% 29%, 80% 21%, 69% 13%, 57% 6%, 45% 3%, 30% 9%, 19% 14%, 8% 24%, 2% 34%, 0% 49%, 0% 62%, 4% 73%, 13% 84%, 24% 91%, 33% 97%, 44% 99%, 46% 89%, 55% 87%, 65% 86%, 76% 82%, 84% 75%, 92% 67%, 98% 58%);}
/* Center the demo */
html, body {
height: 100%;
}
body {
display: flex;
justify-content: center;
align-items: center;
}
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment