Created
April 15, 2013 08:09
-
-
Save johannaruiz/5386545 to your computer and use it in GitHub Desktop.
A CodePen by Johanna Ruiz. CSS Triforce webkit-dropshadow - Using pseudo elements and the filter-webkit-dropshadow property, I created this css trifore with a single empty html element.
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
<div class="triforce"></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
*, | |
*:before, | |
*:after{ | |
box-sizing:border-box; | |
} | |
html{ | |
font-size:100%; | |
min-height:100%; | |
} | |
.triforce{ | |
border-bottom:1.5em solid #FFCC00; | |
border-left:1em solid transparent; | |
border-right:1em solid transparent; | |
position:absolute; | |
display:inline-block; | |
height:0; | |
width:0; | |
margin:-1.5em -1em; | |
left:50%; | |
top:50%; | |
-webkit-filter: drop-shadow(0 2px 3px hsla(0,0%,0%,.25)); | |
} | |
.triforce:before, | |
.triforce:after{ | |
border-bottom: 1.5em solid #FFCC00; | |
border-left: 1em solid transparent; | |
border-right: 1em solid transparent; | |
content: ''; | |
height: 0; | |
position: absolute; | |
top: 1.5em; | |
width: 0; | |
} | |
.triforce:before{ | |
left:0; | |
} | |
.triforce:after{ | |
right:0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment