CSS“位置:固定”在iPad / iPhone? [英] CSS "position: fixed;" on iPad/iPhone?

查看:144
本文介绍了CSS“位置:固定”在iPad / iPhone?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在iPad中固定位置挣扎。我知道 iScroll ,它并不总是似乎工作(即使在他们的演示)。我也知道Sencha有一个修复,但我不能ctrl + f的源代码的修复。

I have been struggling with fixed positioning in iPad for a while. I know iScroll and it does not always seem to work (even in their demo). I also know that Sencha has a fix for that, but I couldn't ctrl+f the source code for that fix.

我希望有人可能有解决方案。问题是当用户在iOS移动Safari上进行向下/向上移动时,固定定位的元素不会更新。

I am hoping that someone may have the solution. The problem is that fixed positioned elements do not get updated when the user pans down/up on an iOS powered mobile Safari.

推荐答案

我最后使用新的jQuery Mobile v1.1: http:/ /jquerymobile.com/blog/2012/04/13/announcing-jquery-mobile-1-1-0/

I ended up using the new jQuery Mobile v1.1: http://jquerymobile.com/blog/2012/04/13/announcing-jquery-mobile-1-1-0/


我们现在有一个坚实的重写,在
a很多流行的平台上提供真正的固定工具栏,安全地回到静态工具栏
在其他浏览器中的定位。

We now have a solid re-write that provides true fixed toolbars on the a lot of popular platforms and safely falls back to static toolbar positioning in other browsers.

这种方法最酷的部分是,不像基于JS的
解决方案,在所有
平台上强加非自然滚动物理,我们的滚动感觉100%原生,因为它。这意味着
滚动感觉到处都是,用触摸,鼠标滚轮
和键盘用户输入工作。作为一个奖励,我们的基于CSS的解决方案是超级
轻量级,并不影响兼容性或可访问性。

The coolest part about this approach is that, unlike JS-based solutions that impose the unnatural scrolling physics across all platforms, our scrolling feels 100% native because it is. This means that scrolling feels right everywhere and works with touch, mousewheel and keyboard user input. As a bonus, our CSS-based solution is super lightweight and doesn’t impact compatibility or accessibility.

这篇关于CSS“位置:固定”在iPad / iPhone?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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