I want to make a triangular shape on bottom of section. But it is not responsive way... when I resize a window, space between :before and :after is bigger and bigger.
How to make it with another way ?
JSFIDDLE DEMO:http://jsfiddle.net/0y4L7hxh
<section id="s1">
<h1>Hello World !</h1>
</section>
<section id="s2">
<h1>Hello Dominik !</h1>
</section>
#s1 {
background-color: green;
padding: 160px 0px;
}
#s2 {
background-color: #330099;
padding: 160px 0px;
}
#s1:before {
position: absolute;
content:"";
bottom: 40px;
width: 51%;
height: 150px;
left: 0;
background-color: green;
transform: rotate(8deg);
z-index: 9999;
}
#s1:after {
position: absolute;
content:"";
bottom: 40px;
width: 51%;
height: 150px;
right: 0px;
background-color: green;
transform: rotate(-8deg);
z-index: 9999;
}