连续滚动在iPhone上无法正常运行

时间:2018-09-01 17:48:10

标签: css iphone scroll

当我在iPhone上滚动时,在我的网页上无法正常工作。它缓慢下降,当我从显示屏上移开手指时,它停止了。 我在页面上使用position:fixed;是因为在电话显示屏上出现问题,因为滚动条导致页面上下滚动。我解决了导航栏修复问题,这不是一种优雅的方法,但是我找不到更好的方法。我读到,如果我使用position:fixed;,则iPhone不会流畅滚动。在android上运行良好。也许有人知道我该如何解决这个问题。

CSS:

.parallax-content {
    padding-top: 57px !important;
    padding-bottom: 153px !important;
}

.outer:after {
    content:"";
    position:fixed;
    left:0;
    top:0;
    right:0;
    bottom:0;
    z-index:-1;
    display:block;
    background:url('img/4/bike-2756269_1920.jpg') no-repeat 80% 50%;
    background-size:cover;
}

.outer{
    position:absolute;
    left:0;
    top:0;
    right:0;
    bottom:0;
    max-height: 100%;
    overflow-y: scroll;
}

0 个答案:

没有答案