Вот идея с использованием нескольких фонов:
body {
margin: 0;
}
.hero-section {
height: 100vh;
min-height: 500px;
background-image: url(http://placeimg.com/1000/480/any);
background-position: center;
background-size: cover;
position: relative;
}
.shape-section {
width: calc(100% - 5%);
max-width: 500px;
height: 40vh;
min-height: 250px;
position: absolute;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background:
linear-gradient(to bottom right,white 49.5%,transparent 50%) bottom right/40px 60%,
linear-gradient(to top right,white 49.5%,transparent 50%) top 20px right 0/40px calc(40% - 20px),
linear-gradient(to top right,white 49.5%,transparent 50%) top left /calc(100% - 40px) 20px,
linear-gradient(white,white) bottom left/calc(100% - 40px) calc(100% - 20px);
background-repeat:no-repeat;
}
.title {
margin-right: auto;
max-width: 70%;
margin-left: 24px;
}
.info {
margin-right: auto;
max-width: 70%;
margin-left: 24px;
}
.cta-button {
background-color: #FF5733;
border-radius: 6px;
border: 1px solid #900c3f;
color: white;
margin-right: auto;
margin-left: 24px;
transition: all .2s;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
font-size: 16px;
padding: 8px 30px;
}
.cta-button:hover {
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
transform: translateY(-2px);
cursor: pointer;
}
<div class="hero-section">
<div class="shape-section">
<h1 class="title">Meet out People</h1>
<p class="info">Der dee herpderpsmer merp re herp derp derps. Ter mer merpus derp perp cerp le sherp? Ler se terp, mer nerpy.</p>
<button class="cta-button">Do Stuff</button>
</div>
</div>
Чтобы лучше понять трюк, используйте разные цвета, чтобы увидеть загадку:
body {
margin: 0;
}
.hero-section {
height: 100vh;
min-height: 500px;
background-image: url(http://placeimg.com/1000/480/any);
background-position: center;
background-size: cover;
position: relative;
}
.shape-section {
width: calc(100% - 5%);
max-width: 500px;
height: 40vh;
min-height: 250px;
position: absolute;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background:
linear-gradient(to bottom right,blue 49.5%,transparent 50%) bottom right/40px 60%,
linear-gradient(to top right,green 49.5%,transparent 50%) top 20px right 0/40px calc(40% - 20px),
linear-gradient(to top right,red 49.5%,transparent 50%) top left /calc(100% - 40px) 20px,
linear-gradient(white,white) bottom left/calc(100% - 40px) calc(100% - 20px);
background-repeat:no-repeat;
}
.title {
margin-right: auto;
max-width: 70%;
margin-left: 24px;
}
.info {
margin-right: auto;
max-width: 70%;
margin-left: 24px;
}
.cta-button {
background-color: #FF5733;
border-radius: 6px;
border: 1px solid #900c3f;
color: white;
margin-right: auto;
margin-left: 24px;
transition: all .2s;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
font-size: 16px;
padding: 8px 30px;
}
.cta-button:hover {
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
transform: translateY(-2px);
cursor: pointer;
}
<div class="hero-section">
<div class="shape-section">
<h1 class="title">Meet out People</h1>
<p class="info">Der dee herpderpsmer merp re herp derp derps. Ter mer merpus derp perp cerp le sherp? Ler se terp, mer nerpy.</p>
<button class="cta-button">Do Stuff</button>
</div>
</div>