I am attempting to create a simple hover effect using two triangles. One triangle should start below the other, and upon hovering, it should appear above the first triangle.
The problem I am encountering is that the surrounding boxes are obstructing the effect. The left triangle, with a temporary z-index above the other, overlaps unnecessarily due to its square perimeter and wasted space.
Hovering over triangle 2 only works in certain areas because of this issue. I have tried using image maps and coordinate mapping to achieve my goal, but I could not maintain a triangular shape while getting the desired functionality. It always defaults to a square.
Is there a way to accomplish this task? I am looking for a method to hover over a specific shape, as CSS/HTML seems limited to squares. Are there any jQuery solutions or alternatives?
Thank you.