Is there a way to eliminate the white spaces in my cuts using clip-path or achieve the same design as shown in the image with images placed next to each other? Can you provide guidance on how to do this?
https://i.sstatic.net/Zxs0z.jpg
This is my CSS code:
.cont__imagenes{
display: flex;
}
.img__{
height: 500px;
width: 350px;
object-fit: cover;
}
.corte_inicial{
clip-path: polygon(0 0, 100% 0, 55% 100%, 0 100%);
}
.corte_diagonal{
clip-path: polygon(55% 0, 100% 0, 50% 100%, 0 100%);
}
.corte_final{
clip-path: polygon(55% 0, 100% 0, 100% 100%, 0 100%);
}
This is my HTML code:
<div class="cont__imagenes"> <div class="subcont__imagenes"> <img class="img__ corte_inicial" src="https://source.unsplash.com/random/?winter,night" alt=""> </div> <div class="subcont__imagenes"> <img class="img__ corte_diagonal" src="https://source.unsplash.com/random/?space,night" alt=""> </div> <div class="subcont__imagenes"> <img class="img__ corte_diagonal" src="https://source.unsplash.com/random/?winter" alt=""> </div> <div class="subcont__imagenes"> <img class="img__ corte_diagonal" src="https://source.unsplash.com/random/900×700/?space" alt="personas"> </div> <div class="subcont__imagenes"> <img class="img__ corte_final" src="https://source.unsplash.com/random/?montain" alt=""> </div> </div>