iPhone Address Bar blocks HTML Page Header Buttons?

后端 未结 3 1707
耶瑟儿~
耶瑟儿~ 2021-02-15 10:59

I have a mobile website with two header buttons. In portrait mode on iPhone it works fine. I can push the buttons.

Here is the problem:

When I switch to Portrait m

3条回答
  •  情深已故
    2021-02-15 11:19

    Have you tried adding a padding to the body? All of the fixed header designs have this. The padding to the body is equal to the height of the bar on your site that contains the icons. You can do them inside media queries if it's only on landscape:

    /* iPhone 4" screen: landscape */
    @media screen and (aspect-ratio: 568/114) and (device-aspect-ratio: 320/568), screen and (aspect-ratio: 568/320) and (device-aspect-ratio: 320/568) {
    
    body {padding-top:20px} /*your padding*/
    
    }
    

提交回复
热议问题