Slopy Another Effect
by Kheema Pandey
HTML
<section class="se-container">
<div class="se-slope">
<article class="se-content">
<h3>Some headline</h3>
<p>Some text</p>
</article>
</div>
<div class="se-slope">
<article class="se-content">
<h3>Some headline</h3>
<p>Some text</p>
</article>
</div>
</section>
CSS
body{
background: #e90089;
}
.se-container{
display: block;
width: 100%;
overflow: hidden;
padding-top: 150px;
}
.se-slope{
margin: 0 -50px;
transform-origin: left center;
}
.se-slope:nth-child(odd){
background: #000;
transform: rotate(5deg);
margin-top: -200px;
box-shadow: 0px -1px 3px rgba(0,0,0,0.4);
}
.se-slope:nth-child(even){
background: #e90089;
transform: rotate(-5deg);
box-shadow: 0px 2px 3px rgba(0,0,0,0.4) inset;
}
.se-content{
margin: 0 auto;
}
.se-content h3{
font-size: 60px;
position: relative;
display: inline-block;
padding: 10px 30px 8px 30px;
height: 80px;
line-height: 80px;
margin-bottom: 20px;
font-family: 'Bitter', 'Trebuchet MS', Arial;
text-shadow: 1px 1px 1px rgba(0,0,0,0.9);
}
.se-slope:nth-child(odd) .se-content h3{
background: #e90089;
color: #000;
}
.se-slope:nth-child(even) .se-content h3{
background: #000;
color: #e90089;
}
.se-content h3:before{
content: '';
width: 0;
height: 0;
border-top: 38px solid transparent;
border-bottom: 60px solid transparent;
border-right: 60px solid black;
position: absolute;
left: -59px;
top: 0px;
}
.se-content h3:after{
content: '';
width: 0;
height: 0;
border-top: 38px solid transparent;
border-bottom: 60px solid transparent;
border-left: 60px solid black;
position: absolute;
right: -59px;
top: 0px;
}
.se-slope:nth-child(odd) .se-content h3:before,
.se-slope:nth-child(odd) .se-content h3:after{
border-right-color: #e90089;
border-left-color: #e90089;
}
.se-content p{
width: 75%;
max-width: 500px;
margin: 0 auto;
font-style: italic;
font-size: 18px;
line-height: 24px;
padding-top: 10px;
}
.se-content p:first-letter{
font-size: 40px;
font-family: 'Adobe Garamond Pro', Georgia, serif;
}
.se-slope:nth-child(odd) .se-content{
transform: rotate(-5deg);
color: #e90089;
...