是否可以通过该链接顶部的图像点击链接? [英] Is it possible to click a link through an image on top that link?

查看:88
本文介绍了是否可以通过该链接顶部的图像点击链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个透明的PNG坐在链接列表顶部的DIV中,我想知道是否有任何方法允许用户点击当前位于图像后面的任何链接jQuery?图像足够大,以至于它一直覆盖在它下方的DIV。

I have a transparent PNG sitting in a DIV on top of a list of links and I would like to know if there is any way to allow a user to click on any of those links currently sitting behind the image with jQuery? The image is large enough that it is covering the DIV below it at all times.

<div id="links"><a href="#">Link</a></div>    
<div id="image"><img src="image.png" alt="" border="0"></div>

我对jQuery世界全新,所以我还在学习,不能完全学习掌握如何做到这一点。任何帮助将不胜感激!

I'm totally new to the world of jQuery so I'm still learning and can't quite grasp how to do this. Any help would be appreciated!

推荐答案

如果图像阻碍链接,则用户无法实际点击它们。您必须为他们提供更高的z-index,或者执行程序化点击。

If the image is obstructing the links, then the user cannot physically click them. You would have to give them a higher z-index, or perform programmatic clicks instead.

这篇关于是否可以通过该链接顶部的图像点击链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆