webapp開發 head基礎搭建

html添加語言

<html lang="zh-CN">

head設置

    編碼:utf-8

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    禁止瀏覽器縮放

    <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="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">

    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">

    iPhone 手機上設置手機號碼不被顯示爲撥號鏈接)

    <meta content="telephone=no, address=no" name="format-detection" />

    IOS私有屬性,可以添加到主屏幕

    <meta name="apple-mobile-web-app-capable" content="yes" />

    屏幕頂部條的顏色

    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

    如下是js說明

    讓WEBAPP支持手機觸摸

    <script type="text/javascript" src="https://hammerjs.github.io/dist/hammer.js"></script>

    讓IE8,IE9,支持Html5和Css3

    <!--[if lte IE 8]>
        這裏添加selectivizr.js的引用,可百度下載
    <![endif]-->
    <!--[if lt IE 9]>
        <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
        <script src="http://www.ijquery.cn/js/html5shiv.js"></script>
    <![endif]-->

    其他如標題、關鍵字、描述就不在這裏說明了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章