Skip to content

Instantly share code, notes, and snippets.

@isaka
Created August 15, 2013 09:05
Show Gist options
  • Save isaka/6239437 to your computer and use it in GitHub Desktop.
Save isaka/6239437 to your computer and use it in GitHub Desktop.
A CodePen by Isaka.
<!-- An adaptation of http://css-tricks.com/examples/ShapesOfCSS/ -->
<div class="chevron">
</div>
.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