问题
<img src="demo_usa.png" width="960" height="593" alt="Planets" usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="#"onmouseover="this.style.backgroundColor='#00FF00';"
onmouseout="this.style.backgroundColor='transparent';"/>
</map>
Where is the problem with onmouse over friends? I want to change the color when the mouse is over thea area shape Thx verry much
回答1:
An area
element just specifies an area of an image, making it clickable. It does not set any rendering properties for that part of the image, so CSS settings on it are ignored.
To make the image change on mouseover, you need to use JavaScript code that replaces the entire image by a different one.
来源:https://stackoverflow.com/questions/20127935/area-shape-in-html