href链接在ie 8中不起作用



我就是想不通。下面的链接在除IE8之外的所有浏览器中都能正常工作。如果你点击IE8中的元素,按钮就会消失。如果您再次单击它所在的位置,它将重新出现。但是,再多的点击也不会真正将您带到href位置。有人能向我解释为什么会这样吗?我已经用尽了所有的想法,但它仍然不起作用。非常感谢您的想法!

html。。。

<div style="padding:0px 0px 30px 0px; clear: both;">
 <div style="width: 50%; display: block; float: left;">
  <a href="../index/features" class="big_button">Learn More</a>
 </div>
 <div style="width: 50%; display: block; float: left;">
  <a href="../index/signup" class="big_button">Get Started</a>
 </div>
</div>

以及样式表。。。

 .big_button {
-moz-box-shadow: inset 0px 1px 0px 0px #bbdaf7;
-webkit-box-shadow: inset 0px 1px 0px 0px #bbdaf7;
box-shadow: inset 0px 1px 0px 0px #bbdaf7;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #79bbff
    ), color-stop(1, #378de5) );
background: -moz-linear-gradient(center top, #79bbff 5%, #378de5 100%);
filter: progid : DXImageTransform.Microsoft.gradient (           
       startColorstr = '#79bbff', endColorstr = '#378de5' );
background-color: #79bbff;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
border: 1px solid #84bbf3;
display: inline-block;
color: #ffffff;
font-family: Arial;
font-size: 18px;
font-weight: bold;
padding: 15px 45px;
text-decoration: none;
margin-left: 130px;
}
.big_button:hover {
 background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #378de5), color-stop(1, #79bbff) );
 background: -moz-linear-gradient(center top, #378de5 5%, #79bbff 100%);
 filter: progid : DXImageTransform.Microsoft.gradient (startColorstr = '#378de5', endColorstr = '#79bbff' );
 background-color: #378de5;
}
.big_button:active {
 position: relative;
 top: 1px;
}

因为css中有"filter:"部分,请删除它,然后它就会工作。。。

我刚刚想明白了。IE8似乎在css中有一个问题:active。因此,样式表的以下部分导致了问题:

.big_button:active {
  position: relative;
  top: 1px;
}

当前的修复方法是排除按钮的css的":active"部分,因为它不是必需的。如果有人有任何关于IE8为什么与:active有问题的进一步信息,我很想知道。

最新更新