K
K
kn1ght_t2016-02-18 12:59:07
css
kn1ght_t, 2016-02-18 12:59:07

What are the ways to make clickable areas in the picture?

d8ebb81b9af8433396f2f2c93e73cc73.jpg
I will open words with detailed information when clicking on a section of the plan.
How can this be done?
I heard about <map> и <area>, but maybe there are better options for this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
GreatRash, 2016-02-18
@GreatRash

It all depends primarily on what browsers you need to support. If only modern, then definitely SVG. True, I don’t understand why the implementation proposed by Maxim Timofeev uses some kind of crap with <object>, because nothing prevents inserting <svg> inside HTML directly.
You don’t even need to draw the map in vector, because you can insert the image inside the SVG, and then overlay transparent polygons on top, which are highlighted when you hover.
codepen.io/GreatRash/pen/PZgrVX

M
Maxim Timofeev, 2016-02-18
@webinar

I like this implementation: habrahabr.ru/post/127994

D
Dmitry Krymtsev, 2016-02-18
@krimtsev

cut pictures and make it all up

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question