<section class="section top grad_bg overflow-hidden">
<p class="text-center">上のコンテンツ</p>
</section>
<section class="section center">
<div class="text-center grad_bg position-relative overflow-hidden">
<div class="wrapper">
<p class="text-center">真ん中のコンテンツ</p>
</div>
</div>
</section>
.section.top {
padding: 4.4em 0 5.7em;
position: relative;
z-index: 1;
min-height: 8em;
}
.section.top::before {
display: block;
content: "";
position: absolute;
left: 0;
border-style: solid;
border-width: 17vw 50vw 0;
border-color: #fff transparent transparent;
z-index: -1;
bottom: 1.5em;
}
.section.top::after {
display: block;
content: "";
z-index: -1;
position: absolute;
left: 0;
background-color: #fff;
height: 72%;
height: calc(100% - 17vw);
width: 100%;
bottom: calc(1.5em + 17vw);
}
@media screen and (max-width: 680px) {
.section.top {
padding: 2em 0 1.5em;
}
.section.top::before {
bottom: calc(23.5vw);
}
}
.section.center {
background-size: 100%;
background-repeat: no-repeat;
background-position: top;
margin-top: -1.25%;
padding-top: 1.25%;
position: relative;
color: #fff;
}
.section.center .grad_bg {
padding-bottom: 6.5em;
z-index: -1;
min-height: 10em;
}
.section.center .grad_bg::after {
display: block;
position: absolute;
content: "";
border-style: solid;
border-width: 17vw 50vw 17vw;
z-index: -1;
bottom: -17vw;
}
.section.center .grad_bg::after {
border-color: transparent #fff #fff #fff;
}
.section.center .grad_bg::before {
border-color: transparent transparent #fff transparent;
}
@media screen and (max-width: 680px) {
.section.center {
padding-top: 0em;
}
.section.center .grad_bg {
padding-bottom: 6em;
}
.section.center .grad_bg::after {
bottom: -10vw;
}
}
.grad_bg {
background-image: linear-gradient(90deg, #22af73, #00a397);
}
This Pen doesn't use any external JavaScript resources.