tôi cần phải ẩn thanh URL trong ipod touch khi applcation web nạp, tôi đã cố gắng tất cả các giải pháp có thể tìm thấy trực tuyến trong đó có một tìm thấy ở đây: http://www.iphonemicrosites.com/tutorials/how-to-hide-the-address-bar-in-mobilesafari/thế nào để ẩn thanh URL trong ipod touch
và thiết phút -height trong CSS, nhưng nó chỉ hoạt động ở chế độ ngang và trong chế độ hồ sơ, nó chỉ ẩn một phần của thanh URL chứ không phải toàn bộ thanh. bất cứ ai có bất kỳ ý tưởng? Cảm ơn.
dưới đây là mã của tôi:
<meta name="app-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-touch-fullscreen" content="YES" />
<meta name="viewport" content="width=320;initial-scale=0.6666;;minimum-scale=0.6666; maximun-scale=1.0;"/>
<title>Test</title>
<script type="application/x-javascript">
addEventListener("load", function()
{
setTimeout(updateLayout, 0);
}, false);
var currentWidth = 0;
function updateLayout()
{
if (window.innerWidth != currentWidth)
{
currentWidth = window.innerWidth;
var orient = currentWidth == 320 ? "profile" : "landscape";
document.body.setAttribute("orient", orient);
setTimeout(function()
{
window.scrollTo(0, 1);
}, 100);
}
}
setInterval(updateLayout, 100);
</script>
<link media="only screen and (max-device-width: 320px)" href="style.css" rel="stylesheet" type="text/css" />
...