[英]Multiple Image on rollover
What I want to do is have 2 images appear when I rollover an image, the first is achieved by using this code, and is a normal rollover: 我想做的是,当我将图像翻转时,有2张图像出现,第一个是通过使用此代码实现的,并且是正常的翻转:
<a href="#" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('','','images/image2.jpg',1)">
<img src="image1.jpg" alt="imageDesc" width="120" height="125" id="Ammar" /></a>
The second image is an info text box which I went to appear slightly offset from the original (ie bottom-right or bottom-left with a slight over lap). 第二个图像是一个信息文本框,我看上去与原始文本框略有偏移(即右下角或左下角略有重叠)。
How can this effect be achieved? 如何达到这种效果? Here is an example for clarification 这是一个澄清的例子
如果将第一张图片放入div并设置id="myDiv
,则可以在onmouseover
代码中像这样更改div的内容
document.getElementById('myDiv').innerHTML="<img ... /> <img ... />";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.