I have created an Iphone wrapper for my single page web application like below
我为我的单页Web应用程序创建了一个Iphone包装器,如下所示
When we reach at the top after scrolling down the container the header moves down and a white space on the top. I can reproduce this issue in IPhone wrapper only. In browser the header will fixed correctly. is there any specific reason for this issue or is this is the default behavior of IPhone? if not how can i resolve this?
当我们在向下滚动容器后到达顶部时,标题向下移动并且顶部有一个白色空间。我只能在IPhone包装器中重现此问题。在浏览器中,标题将正确修复。是否有任何特定原因导致此问题,或者这是iPhone的默认行为?如果不是我怎么解决这个问题?
Css i have applied to the header is
Css我已经申请了标题是
position: fixed;
z-index: 1;
width: 100%;
top: 0;
1 个解决方案
#1
-2
did you try media query or important the css?
你尝试过媒体查询还是重要的css?
@media only screen and (min-device-width: 480px){}
#1
-2
did you try media query or important the css?
你尝试过媒体查询还是重要的css?
@media only screen and (min-device-width: 480px){}