iPad 的滚动框架
我正在开发一个 Web 应用程序,该应用程序将兼容 IE9/HTML5 并在 iPad 上运行。我遇到的问题是,当它在浏览器中正常工作时,我似乎无法让框架在 iPad 上正确(或根本)滚动。我尝试过单指滚动和两指滚动以及下面列出的所有组合。任何帮助/想法将不胜感激。
(仅供参考:Telerik 是第三方控制库)
<telerik:RadSplitter ID="radSplitter2" runat="server" Height="100%">
<telerik:RadPane ID="RadPane2" runat="server" Scrolling="Both">
<iframe width="100%" height="100%" scrolling="no" src="HTMLPage1.htm" />
</telerik:RadPane>
</telerik:RadSplitter>
<telerik:RadSplitter ID="radSplitter3" runat="server" Height="100%">
<telerik:RadPane ID="RadPane4" runat="server" Scrolling="Both" ContentUrl="HTMLPage1.htm">
</telerik:RadPane>
</telerik:RadSplitter>
<telerik:RadSplitter ID="radSplitter4" runat="server" Height="100%">
<telerik:RadPane ID="RadPane5" runat="server" Scrolling="Both">
<div style="width:100%; overflow:auto">
<iframe width="100%" height="100%" scrolling="no" src="HTMLPage1.htm" />
</div>
</telerik:RadPane>
</telerik:RadSplitter>
此代码可以工作,但我确实需要能够将页面作为框架包含在内。
<telerik:RadSplitter ID="radSplitter1" runat="server" Height="100%">
<telerik:RadPane ID="RadPane3" runat="server" Scrolling="Both">
This Section Scrolls
This Section Scrolls
This Section Scrolls
This Section Scrolls
This Section Scrolls
This Section Scrolls
</telerik:RadPane>
</telerik:RadSplitter>
I am developing a web application that is going to be both IE9/HTML5 compatible and work on the iPad. The issue I'm running into is that I can't seem to get frames to scroll correctly (or at all) on the iPad while it works fine in a browser. I have tried both single finger scrolling and two-finger scrolling and all of the listed combinations below. Any help/ideas would be greatly appreciated.
(FYI: Telerik is a third party control library)
<telerik:RadSplitter ID="radSplitter2" runat="server" Height="100%">
<telerik:RadPane ID="RadPane2" runat="server" Scrolling="Both">
<iframe width="100%" height="100%" scrolling="no" src="HTMLPage1.htm" />
</telerik:RadPane>
</telerik:RadSplitter>
<telerik:RadSplitter ID="radSplitter3" runat="server" Height="100%">
<telerik:RadPane ID="RadPane4" runat="server" Scrolling="Both" ContentUrl="HTMLPage1.htm">
</telerik:RadPane>
</telerik:RadSplitter>
<telerik:RadSplitter ID="radSplitter4" runat="server" Height="100%">
<telerik:RadPane ID="RadPane5" runat="server" Scrolling="Both">
<div style="width:100%; overflow:auto">
<iframe width="100%" height="100%" scrolling="no" src="HTMLPage1.htm" />
</div>
</telerik:RadPane>
</telerik:RadSplitter>
This code works but I really need to be able to include a page as a frame.
<telerik:RadSplitter ID="radSplitter1" runat="server" Height="100%">
<telerik:RadPane ID="RadPane3" runat="server" Scrolling="Both">
This Section Scrolls
This Section Scrolls
This Section Scrolls
This Section Scrolls
This Section Scrolls
This Section Scrolls
</telerik:RadPane>
</telerik:RadSplitter>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
当指定 Pane 的 ContentUrl 属性时,您会检查它如何与内部 iframe 一起工作吗?
http://demos.telerik.com/aspnet-ajax/splitter /examples/externalcontentloading/defaultcs.aspx
Would you check how it works with internal iframe(s) when Pane’s ContentUrl property is specified?
http://demos.telerik.com/aspnet-ajax/splitter/examples/externalcontentloading/defaultcs.aspx
解决方案最终只是使用 javascript 强制框架滚动:
只需将其放在标签的位置即可。
The solution ended up being just forcing the frames to scroll using javascript:
just put this in place of your tag.
对于 iOS 设备,您需要设置
overflow: auto;
,否则滚动将不起作用。对于我的网络应用程序,我使用 fancybox 以模式方式显示 iframe,一旦我更改了 css 文件中的溢出设置,两指滚动就可以在 iPad 上完美运行。For iOS devices you need set
overflow: auto;
or the scrolling won't work. For my web apps I used fancybox to display iframes modally and once I change the overflow setting in the css file the two finger scroll worked perfectly on the iPad.