html:-
<div class="mk">
<h1>Header Content</h1>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
<polygon class="svg--sm" fill="white" points="0,0 30,100 65,21 90,100 100,75 100,100 0,100"/>
<polygon class="svg--lg" fill="white" points="0,0 15,100 33,21 45,100 50,75 55,100 72,20 85,100 95,50 100,80 100,100 0,100" />
</svg>
</div>
css:-
.mk {
position: relative;
height: 300px;
background-image: linear-gradient(#ec192c, #ff6126);
}
h1 {
padding: 100px 0;
font: 44px "Arial";
text-align: center;
}
.mk h1 {
color: white;
}
svg {
position: absolute;
bottom: 0;
width: 100%;
height: 100px;
}
@media (max-width: 699px) {
.svg--lg {
display: none;
}
}
@media (min-width: 700px) {
.svg--sm {
display: none;
}
}
Result:-
<div class="mk">
<h1>Header Content</h1>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
<polygon class="svg--sm" fill="white" points="0,0 30,100 65,21 90,100 100,75 100,100 0,100"/>
<polygon class="svg--lg" fill="white" points="0,0 15,100 33,21 45,100 50,75 55,100 72,20 85,100 95,50 100,80 100,100 0,100" />
</svg>
</div>
css:-
.mk {
position: relative;
height: 300px;
background-image: linear-gradient(#ec192c, #ff6126);
}
h1 {
padding: 100px 0;
font: 44px "Arial";
text-align: center;
}
.mk h1 {
color: white;
}
svg {
position: absolute;
bottom: 0;
width: 100%;
height: 100px;
}
@media (max-width: 699px) {
.svg--lg {
display: none;
}
}
@media (min-width: 700px) {
.svg--sm {
display: none;
}
}
Result:-
This is very useful for me
ReplyDelete