mobile-browser

How to launch apps (facebook/twitter/etc) from mobile browser but fall back to hyperlink if the app isn't installed

…衆ロ難τιáo~ 提交于 2019-11-26 09:17:56
问题 I am hoping there might be some way of detecting whether or not an uri:scheme is registered on a mobile device from within the browser. IE: I\'d like to check if the facebook, twitter, pinterest apps are installed and can be launched from their associated uri:scheme. if(fb_isInstalled) { // href=\"fb://profile/....\" } else { // href=\"http://m.facebook.com/...\" } Basically if the user has installed facebook, then launch the app, but fall back to the mobile version of the fb website if the

forcing web-site to show in landscape mode only

人走茶凉 提交于 2019-11-26 03:53:19
问题 I want to show my web-site in landscape mode only, is it possibile? It does not matter what the orientation is of device in user\'s hand but the web site will always be in landscape mode. I have seen iPhone application working like that but can this be done for a web-site? 回答1: @Golmaal really answered this, I'm just being a bit more verbose. <style type="text/css"> #warning-message { display: none; } @media only screen and (orientation:portrait){ #wrapper { display:none; } #warning-message {

Overflow-x:hidden doesn&#39;t prevent content from overflowing in mobile browsers

感情迁移 提交于 2019-11-26 02:55:47
I have a website here . Viewed in a desktop browser, the black menu bar properly extends only to edge of the window, since the body has overflow-x:hidden . In any mobile browser, whether Android or iOS, the black menu bar displays its full width, which brings whitespace on the right of the page. As far as I can tell, this whitespace isn't even a part of the html or body tags. Even if I set the viewport to a specific width in the <head> : <meta name="viewport" content="width=1100, initial-scale=1"> The site expands to the 1100px but still has the whitespace beyond the 1100. What am I missing?

Overflow-x:hidden doesn&#39;t prevent content from overflowing in mobile browsers

无人久伴 提交于 2019-11-26 01:12:22
问题 I have a website here. Viewed in a desktop browser, the black menu bar properly extends only to edge of the window, since the body has overflow-x:hidden . In any mobile browser, whether Android or iOS, the black menu bar displays its full width, which brings whitespace on the right of the page. As far as I can tell, this whitespace isn\'t even a part of the html or body tags. Even if I set the viewport to a specific width in the <head> : <meta name=\"viewport\" content=\"width=1100, initial

Detecting a mobile browser

我只是一个虾纸丫 提交于 2019-11-25 22:52:53
问题 I\'m looking for a function which return boolean value if user has mobile browser or not. I know that I can use navigator.userAgent and write that function by using regex, but user-agents are too various for different platforms. I doubt that match all possible devices would be easy, and I think this problem has been solved before many times so there should be some kind of complete solution for such task. I was looking at this site, but sadly the script is so cryptic that I have no idea how to