溢出:滚动元素在Android和本机滚动,-webkit溢出滚动:触摸 [英] Overflow:scroll elements on android and native scrolling, -webkit-overflow-scrolling: touch

查看:126
本文介绍了溢出:滚动元素在Android和本机滚动,-webkit溢出滚动:触摸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

..与这个项目我将烧伤我的大脑在某一点。 10小时后仍然没有任何东西。

..with this project I am going to burn my brains at some point. After 10 hours still nothing on this.

没有任何流畅的Android股票浏览器(目前测试在s3迷你,android 4.1.2)在overflown元素。

There isn't any smoothness in the Android stock browser (currently testing on s3 mini, android 4.1.2) in overflown elements.

因此,我在这里阅读了这篇文章:
Chrome浏览器的Android不再支持-webkit溢出滚动?是否有替代方案?

So, I read this article here: Chrome Browser for Android no longer supports -webkit-overflow-scrolling? Is there an alternative?

...文章说,你必须严格使用z-index:0在overflown元素中启用'快速滚动'

...the article says that you strictly have to use z-index:0 in overflown elements to enable 'fast scrolling' aka native accelerated scrolling on android devices.

按照上面的内容,通过添加translateZ:(0)和-webkit-translateZ:(0)(这已经花了我几个小时实现!)我已经设法获得Chrome的本机滚动,但是我的生活不能让它在股票Android浏览器工作。

Following the above, and by adding translateZ:(0) and -webkit-translateZ:(0) (this has took me several hours to realize!) I have managed to get native scrolling for Chrome, but for the life of me can't get it to work in the stock Android browser.

Android股票浏览器已经造成了我一百万的问题,到目前为止,它只是不能停止。任何帮助是赞赏!关闭我去睡觉,希望我得到一些...:/

Android stock browser has caused me a million of issues so far, and it just can't stop. Any help is appreciated! Off I go to sleep, hopefully I get some... :/

推荐答案

...作为一个侧

Android无法处理的两种情况:

There is a combination of two things android can't handle:

在固定位置元素上的overflown元素中相对定位的元素。

经过大量的试验和错误,我得出这个结论。 iScroll相当不错,但也很重js - 使用上述组合可能导致相同的性能问题。

I came to this conclusion after a lot of trial and error. iScroll is quite nice but is also quite 'heavy' js - using the above combination could lead to the same performance issues.

因此,如果你可以避免使用上述结构,那么最新的Android版本4+可以处理overflown元素相当好,相当顺利,只要使用-webkit-overflown-scrolling:touch。

So, if you can avoid using the above structure, then the latest android versions 4+ can handle overflown elements quite well and fairly smooth as long as the -webkit-overflown-scrolling:touch is used.

希望这有助于。

这篇关于溢出:滚动元素在Android和本机滚动,-webkit溢出滚动:触摸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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