1
This is the code I currently have:
<img src="images/2.jpg" style="height:973px" border="0"
onmouseover="this.src='images/1.jpg'" onmouseout="this.src='images/2.jpg'"
usemap="#image-map" >
<map name="image-map">
<area alt="CMPC Melhoramentos" title="CMPC Melhoramentos" href="../Cliente SP/production/iindex.php" coords="752,655,546,415" shape="rect">
<area alt="Indaial Papel" title="Indaial Papel" href="../IPEL/production/iindex.php" coords="1576,648,1308,413" shape="rect">
The map is set for the image 1.jpg
, that appears when passing the mouse. However, when I step the mouse precisely over the rectangle set in the map (to click) it goes back to the initial image, the 2.jpg
, as if I had taken off the mouse. How can I make it not to happen?
Edit your question and also include your CSS related to the problem.
– hugocsl
I’m not actually using CSS in this case, just this html code.
– Renata
It became clearer now. What happens is that when you do the Hover on the map the image loses the :Hover and goes back to the image 2
– hugocsl
I get it... there’s some way that it doesn’t happen?
– Renata
I did not understand. Image 2 is the initial. When passing the mouse goes to image 1, when taking the mouse also goes to image 1
– Sam
Behold:
onmouseover="this.src='images/1.jpg'" onmouseout="this.src='images/1.jpg'"
... is all picture 1– Sam
I believe so, I don’t know much about JS so I won’t know how to answer you accurately. But another way to do it would be to replace 1/2 in :Hover with CSS, so you wouldn’t need the onmouseover of JS
– hugocsl
I already changed the code, in onmouseout was the image 2 same.
– Renata
Hugo, I tried some code in CSS but I didn’t succeed, I don’t know much about CSS so I might have missed something. If you have any suggestions, I’d appreciate it.
– Renata