如何在Phonegap中添加垂直滚动 [英] How to add vertical scroll in Phonegap

查看:117
本文介绍了如何在Phonegap中添加垂直滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Phonegap应用中添加垂直滚动。应用程序能够左右移动,但不能上下移动..需要一些指导如何做..谢谢..

I would like to add vertical scroll in Phonegap app. The app is able to move left and right.. but not up and down.. Need some guidance on how to do it.. Thanks..

推荐答案

根据您的应用程序的设置方式,有一些选项。

depending on how your app is set up there are a few options out there.

1)如果您不需要一个固定的标题罕见但却发生),你可以使用正常的CSS方法,phonegap只是一个webview包装为一个原生应用程序,所以大多数事情在浏览器将在这里工作。

1) If you don't need a fixed header ( very rare but does happen ) you can use a normal css approach, phonegap is just a webview wrapped as a native app, so most things in a browser will work here.

2 )如果您需要一个固定的页眉和页脚,我建议 iScroll

2) if you need a fixed header and footer I suggest iScroll.

iOS 5给了我们 -webkit-overflow-scrolling:touch ,它适用于移动safari,但是因为webview是移动safari的小弟弟给定正常的safari有的所有awesomeness。

iOS 5 gave us -webkit-overflow-scrolling: touch, which works in mobile safari, BUT since a webview is mobile safari's little brother you aren't given all of the awesomeness that regular safari has.

这篇关于如何在Phonegap中添加垂直滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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