简体   繁体   English

身体溢出=隐藏时,删除iPhone上的Safari导航栏

[英]Remove Safari Navigation Bar on iPhone when body overflow=hidden

I'd like to remove the Safari navigation bar when users visit my website from an iPhone. 当用户从iPhone访问我的网站时,我想删除Safari导航栏。

I've tried 我试过了
window.scrollTo(0, 1)

and am also using 并且也在使用
<meta name="viewport" content="width=device-width; height=device-height; initial-scale=1.0; maximum-scale=1.0;">
in the header. 在标题中。

The problem is that the body tag of my website is set to overflow=hidden so the scroll command does nothing. 问题是我的网站的body标签设置为overflow = hidden,所以滚动命令什么也不做。

Does anyone know a solution? 有人知道解决方案吗?

以下代码似乎可以作为纵向的初步修复。

<meta name="viewport" content="width=320; height=416; initial-scale=1.0; maximum-scale=1.0;">  

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM