我已经搜索和搜索,并尝试了很多选项来解决这个“错误”,我不能得到它的工作。我有一个div,背景图像隐藏在包装中。在盘旋时,它向顶部发展。该链接位于绝对定位的div内,并且没有文本。在IE上没有“指针”,因此使链接无法点击。这适用于Chrome/FF。绝对定位的div内的空锚标记IE
我已经试过:
- 右边框1px的透明(这实际上,我可以得到一个“指针” 在最右边,但它是如此之小
- 背景: URL(/图片/transparent.gif)0 0重复序列;(是的,我由1x1px反 图像)
- 把另一个DIV具有背景 图像锚内部
- z索引:0或1或2
我想这个,而不是JavaScript的CSS/HTML修复。非常感谢!
CSS
#wrapper
{
width: 950px;
margin: 60px auto 40px;
background-color: #fff;
position:relative;
}
.login-btn
{
background: url(/images/btn-sprite.png) no-repeat 0 -48px;
height: 34px;
width: 98px;
}
#login-btn
{
position:absolute;
top:-15px;
right:20px;
z-index:-1;
}
#login-btn a
{
display:block;
width: inherit;
height: inherit;
background-image: url(/images/transparent.gif) 0 0 repeat;
}
HTML
<div id="wrapper" class="round">
<div id="login-btn" class="login-btn">
<a href="#">
</a>
</div>
.....
.....
没有任何理解。 –
请检查此:http://stackoverflow.com/a/11085782/1169519 – Teemu