鼠标悬停图像会隐藏下面的元素。如何修复?
这是我为了更好地说明这个问题而整理的一个示例:
http://www.saeidmohadjer.com/users/saeid/sandbox/javascript/image_map_rollover/test3/test3.html
当您从图像 A 区域转到图像 B 区域或反向时,有些位置翻转不显示,因为下面的图像图被翻转图像的透明区域覆盖。有没有办法让鼠标悬停图像隐藏?在 ActionScript 中,我可以通过将对象的 mouseEnable 属性设置为 false 来实现此目的,但我不知道如何在 HTML/JavaScript 中执行此操作。
翻转图像(粉红色)是绝对定位的,其 z 索引高于黑色和白色。白色图像。实际用途是每当鼠标在平面图上滚动时突出显示建筑物地板上的平面图。
谢谢,
赛义德
Here is an example I've put together to better illustrate this problem:
http://www.saeidmohadjer.com/users/saeid/sandbox/javascript/image_map_rollover/test3/test3.html
When you go from image A area to image B area or reverse, there are locations where the rollover doesn't show because the image map below is covered with transparent area of rollover image. Is there a way to make the rollover image hidden from mouse? In ActionScript I could do this by setting an object's mouseEnable property to false to get it out of the way, but I don't know how I can do this in HTML/JavaScript.
The rollover image (pink) is absolute positioned with a higher z-index above the black & white image. The practical usage is for highlighting floorplans on a floorplate of a building whenever mouse rolls over a floorplan.
Thanks,
Saeid
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道这是否适合您的情况,但一个简单的方法可能是使您的 black &白色图像部分透明(而不是白色),并将粉红色图像放在其下方(即,给它一个较低的 z-index)。这有帮助吗?
I don't know if this would work for your situation, but an easy way to do it could be to make your black & white image partially transparent (instead of white) and put the pink image below it (that is, give it a lower z-index). Does that help at all?