2013-04-18 85 views
0

我有一個iframe當網頁在滾動內部呼叫時,它不能與Mozilla Firefox一起使用。Mozilla iframe滾動

它工作正常Internet ExplorerGoogle Chrome

<iframe name="contentFrame" id="contentFrame" SRC="<c:out value='${CONTENT_FRAME_URL}'/>" margin width=0 marginheight=0 

vspace=0 hspace=0 scrolling=no WIDTH=780 height="350" frameborder="0" allowtransparency="true" 
     style="position:absolute;overflow:hidden;border:none;"> 
</iframe> 

爲什麼mozilla firefox不支持這個?

克羅姆將此解釋

<iframe name="contentFrame" id="contentFrame" src="empty.jsp" marginwidth="0" marginheight="0" scrolling="no" width="780" height="180%" frameborder="0" allowtransparency="true" style="position: absolute; overflow: hidden; border: none; height: 1003px;"> 

        </iframe> 

函的增加一些高度風格調整滾輪的大小。 但mozzila無法做到這一點。

+0

你能不能使它工作?我遇到同樣的問題。 – Joar 2014-03-18 02:17:35

+0

我通過其他機制解決了這個問題,會提供給你。希望你也能解決。 – Devendra 2014-03-19 06:58:16

+0

@Joar嘗試使用下面的LInk http://stackoverflow.com/questions/9975810/make-iframe-automatically-adjust-height-according-to-the-contents-without-using/9976309#9976309 – Devendra 2014-03-19 07:10:48

回答

0

嘗試使用overflow: auto;我很奇怪,爲什麼這是工作與IE和Chrome

+0

無法正常工作,我試過了。 – Devendra 2013-04-18 07:21:02

+0

我需要邊框滾動條不在iframe內。所以這個解決方案並非必需 – Devendra 2013-04-18 07:32:40

0

嘗試把像素後的寬度和高度值

像這樣:寬=「780px」

+0

不能正常工作.... – Devendra 2013-04-19 09:43:20

+0

嘗試設置樣式內的寬度和高度 – 2013-04-19 10:02:41