gpt4 book ai didi

html - 如何在Shadowbox iframe中滚动?

转载 作者:行者123 更新时间:2023-11-28 10:57:34 25 4
gpt4 key购买 nike

我使用Shadowbox一次显示多个iframe(http://www.shadowbox-js.com/)。

我尝试了以下解决方案:
IFRAMEs and the Safari on the iPad, how can the user scroll the content?

但是没有运气。

生成的iframe的语法为:

<div id="sb-body">
<div id="sb-body-inner">
<iframe id="sb-player">
//iframe content
</div>
</div>
</div>


任何想法如何解决这一问题?我使用iframe的方式需要滚动。

最佳答案

尝试此操作,这样它就不会在其他设备上创建双滚动条。

 $(window).load(function(){

if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {

$('#sb-body-inner').css({
'overflow': 'scroll',
'-webkit-overflow-scrolling': 'touch'
});

}
});

关于html - 如何在Shadowbox iframe中滚动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22568777/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com