2012-07-28 146 views
3

我只是無法弄清楚這一點。下面的鏈接在除IE8以外的每個瀏覽器中都工作得很好。如果您單擊IE8中的元素,該按鈕將消失。如果再次點擊,它會再次出現。但沒有任何點擊會實際引導您到達href位置。有人可以向我解釋爲什麼可能是這樣嗎?我用盡了所有的想法,但仍然無法正常工作。非常感謝您的所有想法!href鏈接不工作在ie 8

的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; 
} 
+0

盒陰影與舊版本IE的問題。試試這個可能的解決方案:http://www.useragentman.com/blog/2011/08/24/how-to-simulate-css3-box-shadow-in-ie7-8-without-javascript/ – 2012-07-28 13:38:27

+0

有趣的,我不知道。不幸的是,即使我刪除了CSS中所有對box陰影的引用,該鏈接仍然無法工作。 – DrNoFruit 2012-07-28 13:45:54

回答

0

我想通了。 IE8似乎有一個問題:活躍在CSS。所以樣式表的以下部分是造成問題:

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

目前的解決辦法是排除:的CSS的「活動」一部分的按鈕,因爲它不是必需的。如果有人有任何進一步的信息,爲什麼IE8有問題:積極,我會有興趣知道這件事。

1

它,因爲「過濾器:」的一部分,在你的CSS,刪除它,然後它會工作...