android项目中phonegap的水平滚动
我正在为 android 和 iphone 开发一个phonegap应用程序。我想在顶部菜单中实现水平滚动,使用常见的 css 规则,它可以在 iPhone 中工作,但不能在 android 中工作。
我的 html 菜单看起来像带有 ul 和 li 的常见列表类型。
你知道我怎样才能做到这一点吗? iScoll 不适合我,我想避免使用 jquery mobile,因为它太重而无法仅实现此功能。如果有人知道 jquery mobile 如何实现这一点并且可以只提取那部分代码那就太好了,或者有人找到了更好的方法来做到这一点。
谢谢
I'm developing an app in phonegap for android and iphone. I want to implement a horizontal scroll in the top menu, with common css rules it's working in iPhone but not in android.
My html menu looks like a common list type with ul and li.
Do you know how I could accomplish this? iScoll is not working for me and I would like to avoid jquery mobile since it's too heavy to implement only this functionality. If someone knows how jquery mobile accomplishes this and could extract only that part of code it would be great, or someone found a better way to do this.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在 iScroll 方面取得了成功
iScroll 是一种在 WebKit 浏览器中提供水平和垂直滚动的方法。
编辑:我看到你已经尝试过 iScroll。那对你不起作用怎么办?这是我能找到的唯一解决方案。
I have had success with iScroll
iScroll is a way to provide horizontal and vertical scrolling in WebKit browsers.
EDIT: I see you have tried iScroll. What about it didn't work for you? It was the only solution I could find.
我尝试使用 requirejs 在phonegap中进行iscroll。
由于某种原因这不起作用。我已经用alert进行了调试,并且在dom准备好后触发了该功能...但是hmenu仍然只是一个普通的列表...没有任何水平渲染...
My try at iscroll in phonegap using requirejs.
this does not work for some reason. I have debugged with alert and the function is triggered after dom is ready ...but the hmenu is still just a normal list...without any horizontal rendering...