通过鼠标悬停在一张主图像的不同位置显示不同的图像
我已经映射了一张主要图像,以便有许多链接到其他图像的不同热点。我想要做的是当用户用鼠标经过热点时弹出这些图像的缩略图。我怎样才能做到这一点?请记住,我是 HTML 新手,几乎不了解 JavaScript...有简单的方法吗?
I have one major image that I have mapped so as to have many different hotspots that link to other images. What I want to do is to have thumbnails of those images popup when the user goes over the hotspots with the mouse. How can I do that? Keep in mind I am new to HTML and barely know JavaScript... is there an easy way out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我现在所能想到的,你将需要使用 JavaScript,至少一点点......
我认为最好的解决方案是这样的:
然后你可以使用position:absolute将DIV定位在#mappedImage中;最后,您将使用 JavaScript 隐藏“小”DIV,并在标签上使用 onmouseover 来显示它们。
我建议将 JQuery 作为 JavaScript 框架。代码将是这样的:
我希望这足够清楚。否则,请在这里发布您剩下的疑问:)
As far as i can think now, you will need to use JavaScript, at least a little bit...
I think the Best solution, would be something like this:
And then you could position the DIV inside the #mappedImage using position:absolute; And to finalize, you would use JavaScript to hide the "small" DIVs and using onmouseover on the tags you would reveal them.
I would suggest JQuery as a JavaScript framework. The code would be something like this:
I hope this is clear enough. otherwise just post here your remaining doubts :)