I am trying to make the design above in CSS. I tried using clip-path to make the triangle in the centre but then the blue and green triangles can't be seen. How can I make this the width of the screen and responsive too?
These are the clip paths for the triangle:
.centerTriangle {
clip-path: polygon(0 0, 50% 100%, 100% 0);
background-color: red;
}
.leftTriangle {
clip-path: polygon(0 0, 0% 100%, 100% 100%);
background-color: blue;
}
.rightTriangle {
clip-path: polygon(100% 0, 0% 100%, 100% 100%);
background-color: green;
}
<div class="leftTriangle"></div>
<div class="centerTriangle"></div>
<div class="rightTriangle"></div>
Would appreciate any help thanks!
