How to draw such an shape via css in a single section(div)?
currently i have used two div check my code
The idea is simple, from horizantally middle the black color first need to go down at 45 degree till next 100px and then it should go at 180 degree for remaining part. All this needs to be done for a single container/section/div.
.grad {
height:100px;
width:100%;
background:linear-gradient(45deg, white 50%, black 0),
linear-gradient(blue 20%, black 0);
}
.grad1 {
height:100px;
width:100%;
background:linear-gradient(-130deg, orange 0%, black 0),
linear-gradient(blue 20%, black 0);
}
<div class="grad1">
</div>
<div class="grad">
</div>
Please guide me to achieve such background in single div via css
You can try something like this:
For a better visualization, change the colors of gradient to see the different shapes: