Created
November 22, 2012 09:38
-
-
Save archasek/4130247 to your computer and use it in GitHub Desktop.
CSS triangle with linear gradient (SO)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- content to be placed inside <body>…</body> --> | |
<div class='t2'></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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