【发布时间】:2021-04-04 23:53:18
【问题描述】:
每个人。 当我的鼠标移动到原始图片的特定区域时,我想在原始图片下显示一张新图片。 而且我是 HTML 和 CSS 的新手,所以我仍然找不到修复它的方法。 我已经尝试了一些代码,但我无法组合在一起。 原始图片是“Cata_all”,图像应该显示在它下面,是“catabottoff”
<body>
<map src="graph/Cata_all.jpg" name="productmap">
<area shape="rect" coords="5,205,150,250" href="catabottoff.jpg" target="">
</map>
<img src="graph/Cata_all.jpg" usemap="#productmap">
</body>
我也尝试过的另一个代码是 onmouseover:
<table border=0 height="50%" width="50%">
<tr valign="top">
<td width="20%">
<img onmouseout="this.src='graph/Cata_all.jpg'" onmouseover="this.src='graph/catabottoff.jpg'" src="graph/Cata_all.jpg"/>
<map src="graph/Cata_all.jpg" name="productmap">
<area shape="rect" coords="5,205,150,250" href="" >
如果你能给我一些提示,我真的很感激。非常感谢~
【问题讨论】:
-
这能回答你的问题吗? Change the mouse pointer using JavaScript
标签: javascript html css