How to make an empty anchor tag clickable in IE7?

前端 未结 4 2031
情书的邮戳
情书的邮戳 2020-12-13 15:44

I need to make an area within a background image clickable to generate an event for JavaScript use. So, I created an anchor tag and inside that I inserted some relevant text

4条回答
  •  無奈伤痛
    2020-12-13 16:27

    I've had an issue in IE9 and below lately where the clickable area around the anchor tag did not work. None of the typical resolutions worked for me. What I found worked was adding this style to the html element:

    html {
    position:relative;
    z-index:-1001;
    }
    

    The z-index ordering is different in IE than in the other browsers.

提交回复
热议问题