Skip to content

Instantly share code, notes, and snippets.

@i2r
Created July 9, 2012 16:15
Show Gist options
  • Select an option

  • Save i2r/3077391 to your computer and use it in GitHub Desktop.

Select an option

Save i2r/3077391 to your computer and use it in GitHub Desktop.
Arrow
/**
* Arrow
*/
html, body {
min-height: 100%;
}
.arrow {
position: absolute;
top: 50%;
right: 0;
margin-top: -50px;
margin-left: -50px;
min-height: 100px;
width: 40px;
background: red;
overflow: hidden;
}
.arrow__i1,
.arrow__i2 {
position: absolute;
top: -50%;
height: 200%;
width: 200px;
}
.arrow__i1 {
left: 10px;
background: green;
transform: rotate(10deg);
overflow: hidden;
}
.arrow__i2 {
background: linear-gradient(-90deg, rgba(254, 235, 138, 1) 40%, red);
transform: rotate(-20deg);
}
<!-- content to be placed inside <body>…</body> -->
<div class="arrow-wrap"><div class="arrow"><div class="arrow__i1"><div class="arrow__i2"></div>
</div></div></div>
{"view":"split-vertical","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