在 iPhone Mobile Safari 中单指滚动内部内容 (div/iframes) [英] Single finger Scrolling for inner contents (div/iframes) in iPhone Mobile Safari

查看:19
本文介绍了在 iPhone Mobile Safari 中单指滚动内部内容 (div/iframes)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Sub:iPhone 移动 Safari 网络应用程序

Sub: iPhone mobile safari web application

即使在用户滚动时,我也需要保持网页的某些部分可见.CSS 属性 position:fixed 无法按预期工作.使用overflow:auto 属性或需要两指滚动,这不是我想要的.

I need to keep some parts of a web page visible even when a user scrolls. The CSS property position:fixed does not work as expected. Using the overflow:auto property on or needs two-finger scrolling which is not what I want.

有没有办法使用javascript或iphone safari Touch API(touchMove事件)在内部div"或iframes"内容上提供单指滚动?

Is there any way to provide single finger scrolling on the inner 'div' or 'iframes' contents using javascript or iphone safari Touch API (touchMove event)?

推荐答案

在 CSS(适用于 iOS 5)中:

In CSS (for iOS 5):

-webkit-overflow-scrolling: touch;

这篇关于在 iPhone Mobile Safari 中单指滚动内部内容 (div/iframes)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆