Suppose I have a square and divide it with diagonals, which leads to four identical triangles (except for their rotation).
- Using CSS / HTML / Javascript is the best way to turn each triangle into a clickable zone without dividing the enclosing square?
I am creating triangles using image maps ( <map> ), but it seems to me that it works only in Internet Explorer.
As another possible solution, I tried rectangular divs that mimic triangles, gradually placing smaller rectangles in the center of the enclosing square of all four “corners of the world”. However, this is not an elegant solution, and in fact, not what I strive for, since I want "smooth", but not jagged triangles.
source share