ios - -webkit-溢出-滚动 : touch is not recognized in chrome and on ios

标签 ios css cordova meteor webkit

要获得我读过的惯性滚动,我需要添加 -webkit-overflow-scrolling: touch;到滚动的 div 上的我的 css。当我添加它并在 chrome 中检查它时,代码被破坏,类似于当您尝试使用无效的 css 时。此外,当我在我的 iPhone 上加载它时(我在 meteor 应用程序中使用 cordova),我仍然没有得到平滑的滚动。我已经添加了

z-index:0
overflow-y: scroll;
-webkit-transform:translateZ(0);

以及使容器绝对定位。这些似乎都不起作用。是否弃用了 webkit-overflow-scrolling?任何帮助将不胜感激

p.s 我的 css 在 Scss 文件中(如果重要的话)

最佳答案

添加更多的 css 为我修复了它,我在 ios safari 中得到了这样的平滑滚动:

-webkit-overflow-scrolling: touch;
-webkit-transform: translateZ(0px);
-webkit-transform: translate3d(0,0,0);
-webkit-perspective: 1000;

如果它是一个网络应用程序,它也可能适合您!

关于ios - -webkit-溢出-滚动 : touch is not recognized in chrome and on ios,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32119204/

相关文章:

javascript - DIV 在内容改变之前跳到顶部

android - ionic Cordova 构建安卓 : Error: spawn EACCES

android - 如何最好地复制 Android 项目?

ios - 使用 codegen 的核心数据实体导致 "initializer required ' init(entity :insertInto: )' " error

ios - 如何在 Swift 的嵌套 for 循环中访问父索引?

html - windows xp下交叉浏览ie8

html - 如何在 HTML 中很好地管理 SVG 内联

ios - 准备转至导航 Controller

ios - NsuserDefaults 键返回 (null)

html - 3 列 css 显示不正确的问题