parallax scrolling issue - div element jerking when scrolling in webkit browsers

前端 未结 6 907
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-12 19:44

I have created a parallax scroll, which seem to be working fine in firefox however in the chrome browser there\'s a slight jump on the body text when scrolling. click here scrol

6条回答
  •  星月不相逢
    2021-02-12 19:48

    You are going to have to change the way that the scrolling works (i.e. change how the spacing is computed), but this can be fixed by adding the position:fixed CSS element to the page elements that are scrolling. The problem is coming from the time that it takes for the JavaScript to process and then render.

    For example, on your page you would set each of the

    tags containing text to have a fixed position and then use the JavaScript/JQuery function to update the top: CSS element. This should make the page scroll smoothly.

提交回复
热议问题