Chrome浏览器Android版不再支持-webkit-溢出滚动?是否有别的选择吗? [英] Chrome Browser for Android no longer supports -webkit-overflow-scrolling? Is there an alternative?

查看:569
本文介绍了Chrome浏览器Android版不再支持-webkit-溢出滚动?是否有别的选择吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更新了Chrome浏览器Android版的最新版本在我的Nexus 7平板电脑,并...

I updated to the newest version of Chrome for Android on my Nexus 7 tablet and ...

-webkit-overflow-scrolling: touch

...不再起作用。此外,下面的计算结果为false:

... no longer works. In addition, the following evaluates to false:

!!('WebkitOverflowScrolling' in document.documentElement.style)

对于溢出支持滚动距离更近移除建立Chrome浏览器Android版?是否有相同或类似的其他选择的动力滚动机构(未iScroll等),我可以在最新的版本中使用发现?

Was support for overflow scrolling removed from more recent builds of Chrome for Android? Is there an equivalent or comparable alternative momentum scrolling mechanism (not iScroll, etc.) that I can use found in the newest version?

同时,我在我的设备上播放存储搜索浏览器测试版,并没有拿出在搜索结果中。也许测试版不提供的的Nexus 7平板电脑?

As well, I searched for Chrome Beta in the Play Store on my device and it does not come up in the search results. Maybe the beta version is not offered for Nexus 7 tablets?

在这个问题上的任何帮助,很多AP preciated。这是非常令人沮丧,谷歌似乎已经从他们的浏览器取消了这一功能......

Any help on this matter is much appreciated. It's very frustrating that Google appears to have removed this feature from their browser ....

修改

edit:

详细版本信息:

的Nexus 7平板电脑运行Android 4.2.2版本

Nexus 7 tablet running Android version 4.2.2

-webkit-overflow-scrolling: touch;

!!('WebkitOverflowScrolling' in document.documentElement.style)

  • 工作和评估为true的Chrome版本18.0.1025469
  • 在不工作,计算结果为假的Chrome浏览器版本26.0.1410.58
  • 推荐答案

    尝试添加的z-index:0 溢出的元素:滚动以创建一个堆叠上下文,它提供一个暗示Chrome浏览器可使用快速滚动code路径。

    Try adding z-index: 0 to the element with overflow: scroll to create a stacking-context that provides a hint to Chrome to use the fast-scrolling code path.

    背景:

    我目前更新到Chrome浏览器的Andr​​oid版最新版后遇到此问题。这也加剧了我的事实,由于这种变化的当前Modernizr的测试这个功能现在返回false,所以我的CSS样式并没有被应用。

    I am currently experiencing this issue after updating to the latest version of Chrome for Android. This was also compounded for me by the fact that due to this change the current Modernizr test for this feature now returns false, so my CSS styles were not being applied.

    周围挖我发现了另一个问题,讨论溢出滚动触摸的支持:

    Digging around I found another issue that discusses the support for overflow scrolling touch:

    的http:// code。 google.com/p/chromium/issues/detail?id=128325#c23

    天仁在调试162363的-webkit-溢出触摸观察   是一种遗传性。因此,设置行为的z-index:0 所有   非隐藏的元素与属性创建堆叠的级联   上下文下方。 (这种行为,背后   ENABLE_ACCELERATED_OVERFLOW_SCROLLING,当前启用仅在   。安卓)的最明显的解决将是集的z-index:0 只   溢出:滚动的元素

    Tien-Ren observed while debugging 162363 that -webkit-overflow-touch is an inherited property. So the behavior of setting z-index: 0 on all non-hidden elements with that property creates a cascade of stacking contexts below it. (This behavior, behind ENABLE_ACCELERATED_OVERFLOW_SCROLLING, is currently enabled only on Android.) The obvious fix would be to set z-index: 0 on only "overflow: scroll" elements.

    因此​​,它似乎是,如果您有与滚动工作不正常,然后添加的z-index问题:0 与溢出的元素:滚动,那么这可能帮帮我。然而,这对我来说没有工作,虽然滚动的部分工作(当我已经修改了Modernizr的CSS-溢出滚动测试返回true此版本的Chrome浏览器)的滚动的动量效应并没有present。

    So it would seem that if you are having issues with the scrolling not working as expected then adding z-index: 0 to the element with overflow: scroll then this may help. However this did not work for me, although the scrolling sections worked (after I had modified the Modernizr css-overflow-scrolling test to return true for this version of Chrome) the momentum effect of the scrolling was not present.

    这篇关于Chrome浏览器Android版不再支持-webkit-溢出滚动?是否有别的选择吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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