出於某種奇怪的原因,使用筆記本電腦或移動設備或甚至低於1080p的分辨率時,導航欄無法正常工作。我無法選擇欄右側的項目。這讓我難倒了。有沒有人有任何想法,爲什麼會這樣?導航欄無法正常工作,分辨率較低
HTML:
<nav>
<ul>
<li><div hidden id="online"><span hidden></span><span hidden class="usersonline"></span></div></li>
<li><a href="index.php">Home</a></li>
<li><a href="supportliberty.php">Support Liberty</a></li>
<li><a href="share.php">Your KTR Success</a></li>
<li><a href="libertyseries.php">Language of Liberty</a></li>
<li><a href="#" onclick='window.open("newsletter/newsletter.pdf");return false;'>Newsletter</a></li>
<li><a href='#' class="login">Student Login</a>
</ul>
<nav>
CSS:
body {
margin: 0;
padding: 0;
height: 100%;
}
nav {
display:block;
position: absolute;
left:0;
white-space:nowrap;
margin: 0 auto;
width: 100%;
min-width: 900px;
max-width: 900px;
background-color:#0D4D8D;
padding-left: 15%;
padding-right: 38.1%;
}
nav ul {
display:block;
margin: 0 auto;
width: 100%;
list-style: none;
display: inline;
white-space:nowrap;
}
nav ul li {
float: left;
position: relative;
white-space:nowrap;
}
nav ul li a {
display: block;
margin: 0 auto;
width: auto;
padding: 0 10px 0 10px;
font-size: 14px;
font-family: "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
line-height: 44px;
text-align: center;
text-decoration: none;
color:white;
white-space:nowrap;
}
nav ul ul {
width: 200px;
position:absolute;
top:-99999px;
left:0;
opacity: 0;
-webkit-transition: opacity .4s ease-in-out;
-moz-transition: opacity .4s ease-in-out;
-o-transition: opacity .4s ease-in-out;
transition: opacity .4s ease-in-out;
z-index:497;
background:#333;
padding: 2px;
border:1px solid #444;
border-top:none;
box-shadow:#111 0 3px 4px;
}
nav ul ul li a {
display: block;
width: 200px;
text-align: left;
padding-left: 3px;
font-size: 14px;
}
nav ul li:hover>ul{
opacity: 1;
position:absolute;
top:98%;
left:0;
}
nav ul li a:hover {
color: #fff;
background-color: black;
}
nav ul li.selected a {
color: #fff;
background-color: black;
}
你可以看到它住在這裏:Center for Self Governance
這是因爲你的 「loginModal」 的z-index的那麼導航欄 –
#modalForgot是重疊在上面。 – Tushar