我正在使用图像映射将一些图像悬停在滑块中,效果很好,但是在加载一次之前会闪烁,然后效果很好。任何人都知道为什么会这样?
顺便说一句,它只发生在 Firefox
<script>
Image1 = new Image()
Image1.src = "images/slide1aroll.jpg"
function firstmap() {
document.emp.src = Image1.src;
return true;
}
</script>
<li style="width: 480px; height: 610px;"><img src="images/slide1a.jpg" name="emp" id="emp" class="emp" width="480" height="610" usemap="#model1" style="display:block; border:none;" border="0" /></li>
<map name="model1" id="model1" name="model1">
<area shape="rect" coords="31,6,289,576" href="#" onmouseover="firstmap();" onmouseout="document.emp.src = 'images/slide1a.jpg';" alt=""/>
<area shape="rect" coords="303,9,475,605" href="#" onmouseover="firstmap2();" onmouseout="document.emp.src = 'images/slide1a.jpg';" />
</map>