2012-07-03 32 views
2

我有一個帶有居中iframe的網站,它具有固定的高度和寬度。所以你不能在iframe中滾動,但你可以滾動整個一面。當光標在iFrame區域(Firefox)上時不滾動

問題:當我要滾動的整個側面,但我有我的鼠標在iframe的區域,這是行不通的。我必須將鼠標移動到一側,以便它不再覆蓋iframe。我在Firefox中只有這個問題。 iframe的

CSS,身體滾動是標準:

.frame{ 
    width:1024px; 
    height:768px; 
    top:50%; 
    margin-top:-384px; 
    border:0; 
    z-index:1; 
    overflow:hidden; 
    position:absolute; 
} 
+0

你說你因爲固定的寬度和高度而不能滾動,那麼你說你可以滾動'整面'?你能澄清嗎? – poepje

+0

我上傳了一張圖片:http://desmond.imageshack.us/Himg51/scaled.php?server=51&filename=framez.jpg&res=landing這個白色盒子是一個iframe,它位於中間(iframe中沒有滾動) )。當我現在向下滾動時,在iframe區域中的光標移到了一邊(白框),我不能滾動,但是如果我移開它,它就會起作用。我只在Firefox中遇到這個問題。 – user1464175

回答

0

刪除你的CSS overflow財產。

.frame{ 
    width: 1024px; 
    height: 768px; 
    top: 50%; 
    margin-top: -384px; 
    border: 0; 
    z-index: 1; 
    overflow: scroll; /* not necessary */ 
    position: absolute; 
}