隐藏URL栏而不隐藏iOS上的Smart App Banner [英] Hide URL bar without hiding Smart App Banner on iOS
本文介绍了隐藏URL栏而不隐藏iOS上的Smart App Banner的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以隐藏地址URL栏,但不能隐藏iOS Safari上的Smart App Banner?
Is it possible to hide the address URL bar but not the Smart App Banner on iOS Safari?
我已经尝试过以下问题的解决方案: https使用MBP.hideUrlBarOnLoad
时,智能横幅仍被隐藏://github.com/h5bp/mobile-boilerplate/blob/master/js/helper.js ,如答案所示.
I have tried the solutions from this question: Hiding address bar without hiding the smart app banner on iOS 6, but it doesn't seem to work. The Smart Banner still gets hidden when I use MBP.hideUrlBarOnLoad
from https://github.com/h5bp/mobile-boilerplate/blob/master/js/helper.js, as the answer suggests to do.
推荐答案
我使用:
$(document).ready(function () {
mob.SetUpEvents();
setTimeout(function () {
if (jQuery("html.iphone").length > 0) {
jQuery('html').css( "height", ( jQuery(window).height() + 60) + 'px');
window.ScrollTo(0, 1);
}
}, 400);
});
我希望这会有所帮助!
这篇关于隐藏URL栏而不隐藏iOS上的Smart App Banner的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文