I need to realize a background like this in CSS:
For now I've done something similar, but of course is totally not the same thing:
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
div.divbg {
position: absolute;
width: 100%;
height: 100%;
}
#layer1 {
background: #4F598A;
z-index: 100;
}
#layer2 {
z-index: 110;
/*background-image: linear-gradient(90deg, rgba(186,52,41,0) 40%, rgba(186,52,41,1) 100%);*/
background-image: linear-gradient(90deg, rgba(186, 52, 41, 0) 43%, rgba(186, 52, 41, 1) 51%);
/*-webkit-clip-path: polygon(100% 0, 54% 1%, 48% 12%, 45% 24%, 45% 36%, 46% 52%, 48% 71%, 53% 93%, 75% 97%, 100% 81%, 100% 53%);*/
/*clip-path: polygon(100% 0, 54% 1%, 48% 12%, 45% 24%, 45% 36%, 46% 52%, 48% 71%, 53% 93%, 75% 97%, 100% 81%, 100% 53%);*/
/*-webkit-clip-path: polygon(51% 0, 50% 5%, 49% 12%, 49% 21%, 50% 35%, 52% 58%, 55% 82%, 59% 100%, 80% 100%, 100% 100%, 100% 0);*/
/*clip-path: polygon(51% 0, 50% 5%, 49% 12%, 49% 21%, 50% 35%, 52% 58%, 55% 82%, 59% 100%, 80% 100%, 100% 100%, 100% 0);*/
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#BA3429', endColorstr='#BA3429',GradientType=1 );*/
/*box-shadow: inset 943px -164px 69px 100px #4F598A;*/
/*background: red;*/
opacity: 0.8;
}
#layer3 {
z-index: 120;
width: 100%;
height: 50%;
/*background: #000 !important;*/
bottom: 0;
content: '';
z-index: 99999 !important;
position: absolute;
background-image: -webkit-linear-gradient(270deg, rgba(0, 255, 255, 0) 0%, rgba(94, 151, 73, 1) 100%);
/*clip-path: polygon(65% 7%, 49% 76%, 2% 66%, 8% 9%, 33% 3%);*/
/*filter: blur(20px);*/
}
<div class="divbg" id="layer1"> </div>
<div class="divbg" id="layer2"> </div>
<div class="divbg" id="layer3"> </div>
Then, I tried to "cut" my gradient elements with clip-path, but of course this is totally worse:
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
div.divbg {
position: absolute;
width: 100%;
height: 100%;
}
#layer1 {
background: #4F598A;
z-index: 100;
}
#layer2 {
z-index: 110;
/*background-image: linear-gradient(90deg, rgba(186,52,41,0) 40%, rgba(186,52,41,1) 100%);*/
background-image: linear-gradient(90deg, rgba(186, 52, 41, 0) 43%, rgba(186, 52, 41, 1) 51%);
/*-webkit-clip-path: polygon(100% 0, 54% 1%, 48% 12%, 45% 24%, 45% 36%, 46% 52%, 48% 71%, 53% 93%, 75% 97%, 100% 81%, 100% 53%);*/
/*clip-path: polygon(100% 0, 54% 1%, 48% 12%, 45% 24%, 45% 36%, 46% 52%, 48% 71%, 53% 93%, 75% 97%, 100% 81%, 100% 53%);*/
/*-webkit-clip-path: polygon(51% 0, 50% 5%, 49% 12%, 49% 21%, 50% 35%, 52% 58%, 55% 82%, 59% 100%, 80% 100%, 100% 100%, 100% 0);*/
clip-path: polygon(51% 0, 50% 5%, 49% 12%, 49% 21%, 50% 35%, 52% 58%, 55% 82%, 59% 100%, 80% 100%, 100% 100%, 100% 0);
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#BA3429', endColorstr='#BA3429',GradientType=1 );*/
box-shadow: inset 943px -164px 69px 100px #4F598A;
/*background: red;*/
opacity: 0.8;
}
#layer3 {
z-index: 120;
width: 100%;
height: 50%;
/*background: #000 !important;*/
bottom: 0;
content: '';
z-index: 99999 !important;
position: absolute;
background-image: -webkit-linear-gradient(270deg, rgba(0, 255, 255, 0) 0%, rgba(94, 151, 73, 1) 100%);
/*clip-path: polygon(65% 7%, 49% 76%, 2% 66%, 8% 9%, 33% 3%);*/
/*filter: blur(20px);*/
}
<div class="divbg" id="layer1"> </div>
<div class="divbg" id="layer2"> </div>
<div class="divbg" id="layer3"> </div>
I don't have any other idea to doing this.
Is there anything else that can I try?