这个问题困扰了我很长时间,我尝试找出解决方案,但是我可以解决。
我在div标签上有background image
,在该图像上我有一部分要选择作为链接的文本。
所以我以这种方式尝试#signUp
是位于div #main_text
中的元素:
#signUp {
display:block;
width:137px;
height:100px;
position:absolute;
left:31px;
top:289px;
}
#main_text {
width: 840px;
height: 335px;
background-color: white;
margin: auto;
position: relative;
}
问题是该代码在除IE之外的所有浏览器中均能正常工作,在IE
signUP
上不可单击,请提供任何解决方案,谢谢。这是html部分:
<div id="main_text">
<?php if (function_exists("easing_slider")){ easing_slider(); }; ?><a href = "#" id="signUp" class="eModal eModal-1"></a>
</div>
最佳答案
看到下面提到的代码,其在IE和IE8 +上的工作
的HTML
<div id="main_text">
<a href = "#" target="_blank" id="signUp" class="eModal eModal-1">Sign Up</a>
</div>
的CSS
#signUp {
display:inline-block;
width:137px;
height:100px;
position:absolute;
left:31px;
top:289px;
background:red;
color:black;
text-align:center;
}
#main_text {
width: 840px;
height: 335px;
background-color: green;
margin: auto;
position: relative;
}
DEMO
关于html - bg-image上的可点击链接,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13526175/