我有一個子導航,它位於不同瀏覽器的兩個不同位置,我不確定原因。我意識到使用margin-top而不是top可以解決這個問題,但問題是當子導航出來時我有一個jQuery幻燈片動畫,並且在我使用margin-top時它看起來不太好比現在更進一步。這裏是差的圖片:瀏覽器之間相對框的絕對位置最大不同
http://jsfiddle.net/eAqev/ < - JS小提琴
HTML:
<div id="navigation">
<ul>
<li><h1>01. About</h1><h2>Learn about us</h2></li>
<li class="button"><h1>02. Products</h1><h2>View our selection of products</h2>
<ul class="scrollDown">
<li><p>Kitchen Worktops</p></li>
<li><p>Upstands/Splashbacks</p></li>
<li><p>Gables/ Panels</p></li>
<li><p>Glass</p></li>
<li><p>High Gloss</p></li>
<li><p>Bathroom Tops</p></li>
<li><p>Sinks/ Taps</p></li>
</ul>
</li>
<li><h1>03. Contact</h1><h2>Contact us!</h2></li>
<li><h1>04. Gallery</h1><h2>View photos of us</h2></li>
</ul>
</div>
CSS:
#navigation ul {
display: inline;
position: relative;
}
#navigation ul li {
float: left;
width: 200px;
height: 35px;
margin: 10px;
list-style: none;
border-bottom: 3px solid #ccc;
}
#navigation ul li:hover {
border-bottom: 6px solid #eee;
cursor: pointer;
}
#navigation ul ul {
position: absolute;
z-index: 1500;
margin: 0;
padding: 0;
list-style:none;
background: #fff;
width: 200px;
top: 60px;
opacity:0.95;
filter:alpha(opacity=95);
-moz-opacity:0.95;
}
什麼提琴?哪些瀏覽器可以正常工作,哪些瀏覽器無法正常工作? – falsarella
http://jsfiddle.net/eAqev/和Internet Explorer + Firefox似乎是相同的,Chrome是不同的。不知道其他人〜 –