Answer the question
In order to leave comments, you need to log in
How to revive an image?
Hello.
There is such a layout, there are letters, on hover the house should be highlighted.
A modal window should open on click.
What technologies to use to achieve the goal?
Answer the question
In order to leave comments, you need to log in
Advise ... Change backgrounds - forget it. HTML area - also bury.
Take your picture. On top of the buildings create a vector path (circle the buildings).
Mark up the drawn paths as you like, it will be enough to hang a class for further styling by hover + significant information for the tooltip / click / whatever else in the data attributes.
<svg ...>
<path class="area" data-id="1" d="..." />
<path class="area" data-id="2" d="..." />
</svg>
In Adobe Illustrator, draw contours and plates and info over the hulls, save a copy as .. SVG. Take the code and paste it into HTML. Display over bitmap.
Give an id to the outline and plate shapes. Do not confuse, as I did: the plates come out for the wrong contours.
JS can use these id's to access SVG elements as normal HTML elements, and listen for events on them. Highlight the contour on mouse over, show the sign brighter:
In svg, put your picture as a background, place contours on top of the houses,
here is an elementary example:
And here, without an SVG editor, you can simply click on the image with the mouse to get the coordinates for the outline.
jsfiddle.net/Stalk/kLvnc9ru
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question