Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mobile web: -webkit-overflow-scrolling: touch conflicts with position:fixed

I use position: fixed to create a fixed top navigation menu on my mobile web application.

After adding -webkit-overflow-scrolling: touch, the scrolling works smoothly. However, the top menu disappears during scrolling. It shows only after the scrolling stops.

I have searched many solutions, such as CSS3 property webkit-overflow-scrolling:touch ERROR and iOS5 Images disappear when scrolling with webkit-overflow-scrolling: touch. However, the given solutions are not working for me. Please check out this example: http://jsbin.com/woxuwihuzu/12/ (visited from iPhone 5c Chrome/Firefox).

Did I miss anything?

like image 293
Joy Avatar asked Apr 17 '15 09:04

Joy


People also ask

What position helps text the browser fixed?

The fixed positioning property helps to put the text fixed on the browser. This fixed test is positioned relative to the browser window, and doesn't move even you scroll the window.

How do you use sticky position?

To see the effect of sticky positioning, select the position: sticky option and scroll this container. The element will scroll along with its container, until it is at the top of the container (or reaches the offset specified in top ), and will then stop scrolling, so it stays visible.


1 Answers

After two days struggling, I found this post saves me: 100% screen height css.

I have to limit the height of my content area to be the same height of the screen. Please find the working demo here: http://jsbin.com/tubaqaqumi/3/ (visit from a real phone; a Chrome simulator doesn't tell the difference).

like image 190
Joy Avatar answered Sep 19 '22 15:09

Joy