位置:Windows Phone 7 中固定
我正在尝试创建 PhoneGap Windows Phone 7 应用程序。为了模仿应始终在横向屏幕左侧可见的应用程序栏,我想放置一个 CSS 为 position:fixed
代码>.然而这不起作用,因为 WP7 上的 IE 似乎不支持它。
有谁知道如何在没有 position:fixed
可用的情况下显示这样的应用程序栏?
提前致谢
I'm trying to create a PhoneGap Windows Phone 7 application. In order to imitate an Application bar that should always be visible at the left side of the screen in landscape orientation, I wanted to place a <div>
with CSS as position:fixed
. This does not work, however, because the IE on WP7 seems not to support it.
Does anyone have an idea how I can display such an Application bar without having position:fixed
available?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也一直纠结这个问题。看起来确实不可能创建一个固定元素并在每次滚动后定位元素,看起来更糟糕(尝试手机上的 jquery mobile 在线示例,他们就是这样做的)。
我通过为我的非固定内容使用 div 容器来“解决”这个问题,样式为“overflow:scroll”并且大小固定。这对我有用。但在此容器中滚动看起来不像本机滚动。
希望有帮助
I was also hanging on this problem. It really seems not to be possible to create a fixed element and to position elements after every scroll looks even worse (try the jquery mobile online examples on your phone they do it this way).
I "solved" the problem by using a div container for my non fixed content with style="overflow: scroll" and fixed size. This worked for me. But scrolling in this container doesn't look like native scrolling.
Hope that helps
我已经成功解决了我的 Win 手机 8 (Lumia 930) 上的问题。
我有一个模态窗口,在移动设备上打开时应保留在视点中并在内部滚动。 Android 和 iphone 工作正常,位置固定,但 win 手机则不行。
我的解决方案是当模态处于活动状态时将活动类放在 html 上,并将其添加到 css 中:
打开模态时将 html 和 body 定位到绝对位置解决了问题。希望有帮助!
I've managed to solve the problem on my Win phone 8 (Lumia 930).
I have a modal window and when opened on mobile should stay in view point and scroll inside. Android and iphone worked fine with position fixed but win phone didn't.
My solution was to put active class on html when the modal is active and add this to css:
This positioning html and body to absolute when modal is opened solved the problem. Hope it helped!