Skip to content

Instantly share code, notes, and snippets.

@archasek
Created November 22, 2012 09:38
Show Gist options
  • Save archasek/4130247 to your computer and use it in GitHub Desktop.
Save archasek/4130247 to your computer and use it in GitHub Desktop.
CSS triangle with linear gradient (SO)
/**
* CSS triangle with linear gradient (SO)
* http://stackoverflow.com/questions/11712011/how-to-create-uparrow-downarrow-using-simple-css/11712847#11712847
*/
.t2 {
background: red;
width: 300px;
height: 200px;
}
.t2:after {
content:'';
}
.t2:after {
height:100px;
width:100px;
display:block;
background: linear-gradient(-60deg, transparent 63%, #fff 63%),
linear-gradient(-120deg, transparent 63%, #fff 63%),
linear-gradient(top, #ccc, #000);
}
<!-- content to be placed inside <body>…</body> -->
<div class='t2'></div>
{"view":"split","fontsize":"80","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment