iPhone / CSS - change styling if site set as a home screen app
I'm making an iPhone App / Mobile Web site and when I access the site normally )(top image), everything is formated as it should be, but when I set it as a home screen app (bottom), the title goes behind the information bar at the top (or at least it does in the simulator). So I'm wondering what I can do to fix that, or if there's some way to 开发者_如何学Godeclare separate styles if the iphone is in this mode. Thanks for any help you can provide.
http://www.bennadel.com/blog/1950-Detecting-iPhone-s-App-Mode-Full-Screen-Mode-For-Web-Applications.htm
if (("standalone" in window.navigator) && !window.navigator.standalone) {
// do something, like injecting a stylesheet via JS
}
精彩评论