Android/Mobile Webkit CSS Background-Attachment:Fixed Not Working?

前端 未结 1 647
终归单人心
终归单人心 2021-01-05 10:26

Am I just going crazy, or does background-attachment:fixed; really not work in the native Android browser?

I already implemented a simple fix by using two divs inste

相关标签:
1条回答
  • 2021-01-05 10:52

    With native browser scrolling you cannot do that. It's a bug in the default Andriod browser. To implement a fixed element at the top or the bottom you have to apply position: fixed on it and then implement a custom scrolling on the other element which contains the content to scroll.

    I used this Library for this kind of problems: http://cubiq.org/iscroll-4

    You can find examples on its page.

    0 讨论(0)
提交回复
热议问题