本文介绍了位置:固定在 iPad 和 iPhone 上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为 iPad 中的固定定位而苦苦挣扎.我知道 iScroll 并且它似乎并不总是有效(即使在他们的演示中).我也知道 Sencha 有一个修复程序,但我不能 + 那个修复程序的源代码.

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 + 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/

我们现在有一个可靠的重写,提供真正的固定工具栏许多流行的平台并安全地回退到静态工具栏在其他浏览器中定位.

这种方法最酷的部分是,与基于 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.

这篇关于位置:固定在 iPad 和 iPhone 上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 22:03