我正試圖創建一個鼠標懸停效果,將頂層滑動到左側,並使用CSS3顯示底層。該代碼適用於Chrome,但不適用於Firefox ...我又做了一些愚蠢的事情嗎?謝謝你的幫助!CSS3轉換/懸停效果在Firefox中不起作用;一個Firefox錯誤?
編輯:一定是我做錯了什麼事,因爲即使我離開了過渡的代碼,當我在Firefox將鼠標懸停在「圖層」什麼也沒有發生... :(
代碼:
<html>
<div class="layers">
<div class="over">content</div>
<div class="under">content</div>
</div>
</html>
風格:
.layers {
position: relative;
width: 200px;
height: 50px;
overflow: hidden;
}
.over {
width: 200px;
height: 50px;
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
.under {
width: 200px;
height: 50px;
position: absolute;
top: 0px;
left: 0px;
}
.layers:hover .over {
left: -200px;
}
鑑於這似乎取決於你正在做的確切的ajax東西,只是顯示CSS是不是真正足夠的信息來回答這個問題。指向整個頁面? – 2011-06-11 05:13:00
我剛發現它實際上與Ajax無關;即使作爲獨立頁面,CSS過渡,甚至一個簡單的「.over:hover」在Firefox中都不起作用...... :( – nubicurio 2011-06-17 10:14:40
哪FF版本?它對我有用FF4 – clairesuzy 2011-06-17 10:28:39