Created
August 15, 2013 09:05
-
-
Save isaka/6239437 to your computer and use it in GitHub Desktop.
A CodePen by Isaka.
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
<!-- An adaptation of http://css-tricks.com/examples/ShapesOfCSS/ --> | |
<div class="chevron"> | |
</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
.wrap { | |
width: 50px !important; | |
height: 100px | |
margin: 0 auto; | |
background-color: gray; | |
} | |
.chevron { | |
position: relative; | |
text-align: center; | |
padding: 0.5px; | |
margin: 0px auto; | |
height: 0.5px; | |
width: 20px; | |
} | |
.chevron:before { | |
content: ''; | |
position: absolute; | |
top: 0; | |
left: 0; | |
height: 100%; | |
width: 50%; | |
background: red; | |
-webkit-transform: skew(0deg, 20deg); | |
-moz-transform: skew(0deg, 30deg); | |
-ms-transform: skew(0deg, 30deg); | |
-o-transform: skew(0deg, 30deg); | |
transform: skew(0deg, 30deg); | |
} | |
.chevron:after { | |
content: ''; | |
position: absolute; | |
top: 0; | |
right: 0; | |
height: 100%; | |
width: 50%; | |
background: red; | |
-webkit-transform: skew(0deg, -20deg); | |
-moz-transform: skew(0deg, -30deg); | |
-ms-transform: skew(0deg, -30deg); | |
-o-transform: skew(0deg, -30deg); | |
transform: skew(0deg, -30deg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment