我真的很討厭問這個直接的問題,但我一直在試圖弄清爲什麼左邊的subnav(懸停在「關於我們」)將不會顯示在IE中幾個小時,我不能重新在騙取錢財的問題: -/ 這裏的網站:
http://quinnhr.adsinchosting5.com/爲什麼我在IE8/IE9中看不到這個subnav?切換到顯示塊不顯示它
更新絕對只看該^網站的代碼,因爲這只是一個爲了簡潔起見,我認爲問題出在哪裏。 /更新
這裏是在HTML片段,和css:
<nav> <!-- left sidebar -->
<ul>
<li>
<a href="#"> Capabilities </a>
</li>
<li>
<a href="#"> Pricing </a>
</li>
<li>
<a href="#">About Us</a>
<ul id="subNizzle"> <!-- this UL is the issue, see css -->
<li class="subNav">
<a href="#">someone's name</a>
</li>
<li class="subNav">
<a href="#">some else's name</a>
</li>
<li class="subNav">
<a href="#">another name</a>
</li>
</ul>
</li>
CSS ***是的,我知道顯示沒有設置,jQuery代碼覆蓋它懸停,請參閱quinnhr.adsinchosting5.com以獲取代碼。關閉
section aside: first-of-type ul li a{
display:table-cell;
}
至少使subnav顯示出來,但它顯示了在現有資產淨值的頂部,並通過與移動到右側:
section aside:first-of-type ul li a{
position: absolute;
}
section aside:first-of-type ul li ul{
position: absolute;
right:-100px;
z-index: 1000;
}
移動它向右夠它顯示出來,並說明它被隱藏在資產淨值的外...
section aside:first-of-type ul {
display: table;
margin-left: 70px;
margin-top: 25px;
padding: 0px;
position: absolute; }
section aside:first-of-type ul li {
display: table;
height: 45px;
position: relative;
width: 180px; }
section aside:first-of-type ul li a {
color: #F0EBDA;
display: table-cell;
height: 45px;
text-decoration: none;
text-indent: 10px;
vertical-align: middle;
position:absolute; /* update */
}
section aside:first-of-type ul li ul {
display: none;
margin: -45px 0px 0px 179px;
padding: 0px;
position:absolute; /* update */
right: -100px; /* update */
}
的jQuery: 查詢(文件)。就緒(函數($){
$('li a').addClass("nahbro");
$('ul li ul').css({"margin-left": "-10px", "padding" : "0px", "margin-top" : "-45px"});
$('li').hover(function(){
$(this).switchClass("nahbro", "prepare", 400);
$('#subNizzle', this).fadeIn().switchClass("nahbro", "prepare", 300);
$('.subNav').hover(function(){
$(this).switchClass("prepare", "liSelected", 200);
},function(){
$(this).switchClass("liSelected", "prepare", 200);
});
}, function(){
$(this).switchClass("prepare", "nahbro", 400);
$('#subNizzle', this).fadeOut().switchClass("liSelected", "nahbro", 500);
});
我認爲這是與顯示:表/顯示:表細胞/顯示:塊鏈中某處...
如果你看看http://quinnhr.adsinchosting5.com/上的實際源代碼,你會發現我使用的是modernizr/htmlshiv ...我應該這麼說。絕對看看網站上的代碼 –