iOS 移动浏览器滚动位置问题:已修复,滚动结束时页面跳回顶部

Jew*_*wel 5 css scroll ipad shopify ios

POSITION:FIXED在 iOS Mobile 上发现了该属性的许多问题。但它没有解决我的问题。在台式机和 Android 设备中,完美运行。即使在 MacBook Air 中也是如此。

问题:

我有一个position:fixed标题和一个position:relative内容(padding-top:height-of-header用于对齐)。当我快速滚动时,它开始滚动,然后突然跳回页面顶部。但是当我们慢慢滚动时,这个问题没有出现。

这是标题的代码

.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 9999;
}
Run Code Online (Sandbox Code Playgroud)

这是主要内容的代码

  .main-content {
    padding-top: 80px;
    position:relative;
  }
Run Code Online (Sandbox Code Playgroud)

试过-webkit-overflow-scrolling: touch;transform: translate3d(0,0,0);

它是一个电子商务网站,在SHOPIFY开发。