Skip to content

Instantly share code, notes, and snippets.

@doochik
Created May 12, 2016 19:52
Show Gist options
  • Save doochik/263cea33c12c90b1f20d1e24798c6362 to your computer and use it in GitHub Desktop.
Save doochik/263cea33c12c90b1f20d1e24798c6362 to your computer and use it in GitHub Desktop.
Untitled
.container {
position: relative;
width: 100px;
height: 100px;
border :1px solid;
overflow: hidden;
}
.bg {
position: absolute;
top: -50%; right: -50%; bottom: -50%; left: -50%;
background: linear-gradient(#F00 30%, #0F0 70%);
transform: skewy(-20deg);
}
<!-- content to be placed inside <body>…</body> -->
<div class="container">
<div class="bg"/>
</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