I would like to make a shape where the top is skewY -10deg and the bottom is 10deg to produce the shape as seen in the picture:
I can't seem to figure out how to accomplish this.
I would like to make a shape where the top is skewY -10deg and the bottom is 10deg to produce the shape as seen in the picture:
I can't seem to figure out how to accomplish this.
This should do the trick:
CSS
#test {
width: 200px;
height: 200px;
-webkit-transition: all 300ms ease-in;
background: black;
position: relative;
}
#test:after, #test:before {
display: block;
content: "";
color: transparent;
width: 215px;
height: 50px;
background: white;
position: absolute;
left: -10px;
bottom: -20px;
-webkit-transform: rotate(12deg);
-moz-transform: rotate(12deg);
}
#test:before {
bottom: auto;
top: -20px;
-webkit-transform: rotate(-12deg);
-moz-transform: rotate(-12deg);
}
HTML
<div id="test"></div>