问题
I am trying to set a map area on my image, but I want it to be an octagon so I really need to see what I'm drawing.
Unfortunately there is not way for me to style the area tag so that I can see where the mapping is taking place. This is making it really difficult for me to draw these areas, I have to follow it with the mouse every time to know where it begins and where it ends.
Is there a better way ? I'm posting this example with a rectangle just to keep things simple, I just want to see it, through a plugin or anything.
<img src="img/myimg.png" usemap="#mapid" />
<map id="mapid" name="mapid">
<area id="myarea" shape="rect" coords="960, 0, 600, 500" href="#"/>
</map>
回答1:
There are many tools for you to plot the coordinates, and below are four that I usually do.
- If using MS Windows, MS Paint shows the coordinates at the status bar.
- Use an online tool, for example http://www.image-maps.com/
- Use a editor, for example Adobe Dreamweaver
- Use FireBug (http://getfirebug.com/)
Hope that helps :)
回答2:
I found an online image map editor that will help you:
http://www.maschek.hu/imagemap
回答3:
I use the following website to get the coordinates
http://imagemap-generator.dariodomi.de/
<map name="planetmap">
<area alt="facebook" coords="334,280,41" shape="circle" href="https://www.facebook.com/" target="_blank" />
<area alt="Twitter" coords="438,280,41" shape="circle" href="https://twitter.com/" target="_blank" />
<area alt="Gogle Plus" coords="541,280,39" shape="circle" href="https://plus.google.com/" target="_blank" />
<area alt="linkedin" coords="645,280,39" shape="circle" href="https://in.linkedin.com/" target="_blank" />
<area alt="youtube" coords="751,280,41" shape="circle" href="https://www.youtube.com/" target="_blank" />
</map>
For your better I give the link as a reference from there you find what is HTML image map and how can we use it
Image map details
回答4:
you can wrap the area in a span and style it to get height, width, background, and position.
来源:https://stackoverflow.com/questions/12642912/i-need-to-see-an-html-image-map-area