停用在移动设备上隐藏地址栏 [英] Disable hiding of address bar on mobile

查看:104
本文介绍了停用在移动设备上隐藏地址栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个移动网站,其中有页面,它占据了屏幕的全尺寸,你可以在每个之间滚动。问题是,每当用户向下滚动时,窗口会改变大小,因为地址栏会隐藏。

I'm working on a mobile website which has "pages" that have div's which take up the screens full size and you can scroll between each one. The problem is, the window resizes whenever a user scrolls downward because the address bar hides. This causes problems when you scroll to the complete bottom and the address bar then hides.

可以让地址栏始终显示在移动设备上吗?

Is it possible to have the address bar always show on mobile devices?

推荐答案

您可以用 div 包装HTML,然后执行这样的操作: http://jsfiddle.net/DerekL/Fhe2x/show

You can wrap your HTML with div and do something like this: http://jsfiddle.net/DerekL/Fhe2x/show

$("html, body, #wrapper").css({
    height: $(window).height()
});

它适用于Android和iOS。

It works on Android and iOS.

这篇关于停用在移动设备上隐藏地址栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆