zoukankan      html  css  js  c++  java
  • iphone/ipad fullscreen

    1.

    apple api :http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html

    others:http://mobile.tutsplus.com/tutorials/iphone/iphone-web-app-meta-tags/

    full screen:

    1. add <meta name="apple-mobile-web-app-capable" content="yes"> to html head.

    2. run web apps, click “+” , add to home screen, add

    3. run link on desktop, it will full screen, every pages need add this <meta>

      if run at safari, that will not full screen.

    viewport:

    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale = 1, maximum-scale = 5, user-scalable = yes" />

     zoom in/ zoom out

    user-scalable: yes, can zoom; no: can't; default yes

    scale: 0-10, it seems no effect below 1;

    Application icon:

    <link rel="apple-touch-icon" href="../image/iphone-icon.png" />

    2 . (this is better)

    js code
    $(window).load(function() {
        setTimeout(function(){
            if(typeof(window.scrollTo) == 'function'){
                window.scrollTo(0, 1);
            }
        }, 100);
    });

    scroll header to top(hide), if you need, scroll down, it appears.

  • 相关阅读:
    Palindrome
    Girls' research
    最长回文
    Water Tree
    Alternating Current
    Psychos in a Line
    Feel Good
    Color the Fence
    javaScript内置类Date,Math等
    DOM之兄弟节点
  • 原文地址:https://www.cnblogs.com/tiechui/p/1873802.html
Copyright © 2011-2022 走看看