【问题标题】:Hide address bar on mobile DNN webApp for iphone and android在 iphone 和 android 的移动 DNN webApp 上隐藏地址栏
【发布时间】:2017-01-02 03:52:18
【问题描述】:

我正在尝试隐藏 iphone 和 android 的地址栏(如果可能),并且通过将以下代码插入到他们的 default.aspx 文件中,看到多个线程使用以下代码 sn-p 作为其 DNN 网站的一部分:

<%-- Add mobile bookmark buttons --%>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes">

<%-- Set Apple icons. --%>
<asp:PlaceHolder ID="appleIcons" runat="server" />

<%-- Set view port for mobile devices. --%>
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, minimal-ui">

<%-- Set Apple icons. --%>
<link rel="apple-touch-icon" href="/Portals/0/images/apple-touch-icon-114x144.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/Portals/0/images/apple-touch-icon-114x144.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/Portals/0/images/apple-touch-icon-114x144.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/Portals/0/images/apple-touch-icon-114x144.png" />

<%-- Remove URL bar on mobile devices. --%>
<script type="application/x-javascript"> 
    addEventListener("load", function() { setTimeout( hideURLbar, 0); }, false); 
    function hideURLbar(){ window.scrollTo(0,1); } 
</script>

我已经测试了关于这个主题的所有相关主题。以上内容以前在一个网站上工作,尽管只在 iPhone 上工作,但不再为我工作。欣赏任何 cmets。

【问题讨论】:

    标签: javascript android ios iphone dotnetnuke


    【解决方案1】:

    更新:回答我自己的问题(注意仅适用于移动 webApp 而不是移动浏览器):

    <%-- Add Apple & Android bookmark buttons --%>    
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="mobile-web-app-capable" content="yes">
    
    <%-- Set view port for Apple & Android devices. --%>
    <meta name = "viewport" content = "width=device-width" />
    <meta name="viewport" content="width=device-width, minimal-ui">
    
    <%-- Set Apple & Android icons. --%>
    <link rel="apple-touch-icon" sizes="96x96" href="/Portals/0/images/favicon-96x96.png" />
    <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
    
    <%-- Set Apple Smart App Bannner by entering app store url in app id field below. --%>
    <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
    

    【讨论】:

      猜你喜欢
      • 2013-07-21
      • 2011-05-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-28
      • 2011-07-09
      相关资源
      最近更新 更多