zoukankan      html  css  js  c++  java
  • 关于头文件的一些常用<meta>

    一、常见的<meta>(摘自百度)

    1.

    设置编码信息<meta http-equiv="Content-Type" Content="text/html; Charset=utf-8" />

    设置语言<meta http-equiv="Content-Language" Content="zh-CN" /> 

    设置重定向 <meta http-equiv="Refresh" Content="15; Url=http://www.baidu.com" /> 

    设置缓存时间 <meta http-equiv="Expires" Content="Web, 26 Jun 2015 18:21:57 GMT" /> 

    不使用缓存 <meta http-equiv="Pragma" Content="No-cach" /> 

    设置关键字 <meta name="Keywords" Content="key1,key2,..." /> 

    设置描述信息 <meta name="Description" Content="description abc" />

    设置对搜索引擎抓取 <meta name="Robots" Content="All|None|Index|Noindex|Follow|Nofollow" /> 

    设置可视区域 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> 

    2.浏览器使用:  

    <!-- 国产浏览器内核选择 --> <meta name="renderer" content="webkit|ie-comp|ie-stand">

     <!-- 使用最新版的ie浏览器,或者chrome--> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> 
    <!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 -->

     <meta name="HandheldFriendly" content="true">

     <!-- 微软的老式浏览器 --> <meta name="MobileOptimized" content="320"> 

    <!-- 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 http-equiv="Cache-Control" content="no-siteapp" /> 

    二、tabindex属性(摘自W3C):

    1、作用:规定元素的tab键控制次序;

    2、支持该属性的标签:

    <a>,<area>,<button>,<object>,<select>,<textarea>,<meta>

    3、示例:

    <!DOCTYPE html>
    <html>
    <body>
    
    <a href="http://www.w3school.com.cn/" tabindex="2">W3School</a><br />
    <a href="http://www.google.com/" tabindex="1">Google</a><br />
    <a href="http://www.microsoft.com/" tabindex="3">Microsoft</a>
    
    <p><b>注释:</b>请尝试使用键盘上的 "Tab" 键在链接之间进行导航。</p>
    
    </body>
    </html>

     三、<meta name="renderer" content="webkit">

    content的取值为webkit,ie-comp,ie-stand之一,区分大小写,分别代表用webkit内核,IE兼容内核,IE标准内核。 


    若页面需默认用极速核,增加标签:<meta name="renderer" content="webkit"> 
    若页面需默认用ie兼容内核,增加标签:<meta name="renderer" content="ie-comp"> 
    若页面需默认用ie标准内核,增加标签:<meta name="renderer" content="ie-stand"> 
    各渲染内核的技术细节 

    内核 Webkit IE兼容 IE标准
    文档模式 Chrome 21 IE6/7 IE9/IE10/IE11(取决于用户的IE)
    HTML5支持 YES NO YES
    ActiveX控件支持 NO YES YES

     

  • 相关阅读:
    YGC问题排查,又让我涨姿势了!
    AI时代,还不了解大数据?
    实战篇:一个核心系统 3 万行代码的重构之旅
    监控系统选型,这篇不可不读!
    实时离线一体大数据在资产租赁saas服务中使用
    基于监控服务打造微服务治理生态体系
    CDH6.3.2升级Hive到4.0.0
    强化学习 9 —— DQN 改进算法DDQN、Dueling DQN tensorflow 2.0 实现
    强化学习 8 —— DQN 算法 Tensorflow 2.0 实现
    强化学习 7——Deep Q-Learning(DQN)公式推导
  • 原文地址:https://www.cnblogs.com/AndyZhang1993/p/5749292.html
Copyright © 2011-2022 走看看