I need to create a menu with diagonal divs that when passing the mause over color change and each image contains a link to a different category.
The problem is that I can not create a div diagonally, and wanted to find a solution to the problem just by using html and css if possible.
How can I create a mosaic menu like this?
In case just making geometric shapes does not work for me, as it has the background image.
I need to distort the size of the divs to look similar to the image.
Some people are saying that it is duplicate and even voting against my post, so I will show that the problem is not so simple. The problem is much deeper than the geometric shapes because in the border scheme you can not do a background. Just add a background color.
And by skew you can put a background image, but I can not make the images have the correct angle because it distorts the two sides of the angle.
#trapezoid {
border-top: 200px solid transparent;
border-left: 0px solid white;
border-right: 40px solid white;
width: 150px;
float: left;
background-image: url('http://pongnamuroms.weebly.com/uploads/1/3/3/6/13369650/144214_orig.png');
opacity: 0.7;
background-size: calc(100% + 100px);
}
#trapezoid2 {
border-bottom: 200px solid transparent;
border-left: 40px solid white;
border-right: 0px solid white;
width: 150px;
margin-left: -34px;
float: left;
background-image: url('http://www.androidspin.com/wp-content/uploads/2015/05/flow_aquablue.png');
opacity: 0.7;
background-size: calc(100% + 100px);
}
#trapezoid2:hover{
opacity: 1;
}
#trapezoid:hover{
opacity: 1;
}
<div id="trapezoid">
</div>
<div id="trapezoid2">
</div>
<div id="trapezoid3">
</div>