"Background image With Razor-Blade skewed div shape"
Bootstrap 4.0.0 Snippet by Divscodebd

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="header-img"> <img src="https://static.pexels.com/photos/356185/pexels-photo-356185.jpeg" alt=""> </div> <div class="header-content"> <h2>Why do we use it?</h2> <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model tex</p> </div>
.header-img{ height: 450px; position: relative; width: 100%; } .header-img img{ width: 100%; } .header-content{ background: #fb6b19; color: #fff; height: 450px; padding-top: 130px; position: relative; text-align: center; width: 100%; } .header-content h2{ font-size: 30px; text-transform: uppercase; } .header-content p{ padding: 0px 150px; } .header-content:before{ position: absolute; content: ""; width: 60%; height: 125px; top: -50px; left: 0; background:#fb6b19; transform: skewY(10deg); } .header-content:after{ position: absolute; content: ""; width: 60%; height: 125px; top: -50px; right: 0; background:#fb6b19; transform: skewY(-10deg); }

Related: See More


Questions / Comments:

/Correção no CSS/

.header-img{

height: 450px;

position: relative;

width: 100%;

}

.header-img img{

width: 100%;

}

.header-content{

background: #fb6b19;

color: #fff;

height: 250px;

position: relative;

text-align: center;

bottom: -650px;

width: 100%;

z-index: 0;

padding-bottom: 100px;

}

.header-content h2{

padding-top: 100px;

font-size: 30px;

text-transform: uppercase;

}

.header-content p{

padding: 0px 150px;

}

.header-content:before{

position: absolute;

content: "";

width: 60%;

height: 195px;

top: -90px;

left: 0;

background:#fb6b19;

transform: skewY(10deg);

z-index: -1;

}

.header-content:after{

position: absolute;

content: "";

width: 60%;

height: 195px;

top: -90px;

right: 0;

background:#fb6b19;

transform: skewY(-10deg);

z-index: -1;

}

wender () - 1 year ago - Reply 0