0
我知道很多示例都顯示了這個問題,但我嘗試了一切,並且我的iframe不能在iPhone上滾動。在iPhone上滾動iframe不起作用
我有這樣的代碼:
<div id="content">
<div id="header"><div>
<div id="container_iframe">
<iframe id ="external_content_iframe"></iframe>
</div>
</div>
與CSS
#container_iframe
{
width: 100%;
height: 88%;
z-index: 1001;
margin: auto;
left: 0;
top: 55px;
right: 0;
bottom: 0;
overflow-y:scroll !important;
-webkit-overflow-scrolling:touch !important;
}
#external_content_iframe
{
width: 100%;
height: 100%;
z-index: 1001;
margin: auto;
left: 0;
right: 0;
bottom: 0;
top:15%;
}
你能幫助我嗎?
你是什麼意思滾動鼠標的iframe?就像允許在iframe中滾動一樣? – user1600124 2014-09-30 09:51:26
是的,允許滾動iframe的內容 – user3651419 2014-09-30 09:55:12
真的有點奇怪,你可能不需要在div容器上設置溢出,如果必要的話,iframe應該託管它自己的滾動條。也有可能你必須將body和div.content設置爲100%高度,所以你的容器實際上可以計算高度。 – user1600124 2014-09-30 10:02:27