干货! 移动端配置!

2018-05-18  本文已影响14人  科哚洛夫
    <!--优先使用 IE 最新版本和 Chrome-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <!--移动端配置-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <!--<meta http-equiv="Cache-Control" content="max-age=0">-->
    <meta http-equiv="Cache-Control:private" content="max-age=0">
    <meta name="apple-touch-fullscreen" content="yes">
    <!-- 是否启用 WebApp 全屏模式,删除苹果默认的工具栏和菜单栏 -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <!-- 启用360浏览器的极速模式(webkit) -->
    <meta name="renderer" content="webkit">
    <!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 -->
    <meta name="HandheldFriendly" content="true">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <!-- UC强制全屏 -->
    <meta name="full-screen" content="yes">
    <!-- QQ强制全屏 -->
    <meta name="x5-fullscreen" content="true">
    <!-- UC应用模式 -->
    <meta name="browsermode" content="application">
    <!-- QQ应用模式 -->
    <meta name="x5-page-mode" content="app">
    <!-- windows phone 点击无高光 -->
    <meta name="msapplication-tap-highlight" content="no">
    <!-- 不被显示为拨号连接 -->
    <meta name="format-detection" content="telephone=no">

// 移动端自动占满屏幕! 
   function IndexBannerHeightAuto() {
            if ($(window).width() + 17 < 1023) {
                if ($(".index_us_banner")) {
                    $(".index_us_banner").css("height", ($(window).height() - $(".header-wrap").height() + 16) + "px");
                }
            } else {
               //$(".index_us_banner").css("height","894px");
               $(".index_us_banner").css("height", ($(window).height() - $(".header-wrap").height()) + 45 + "px");
            }
        }
上一篇下一篇

猜你喜欢

热点阅读