关于头文件的一些常用<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 |
关于头文件的一些常用<meta>的更多相关文章
- STL algorithm 头文件下的常用函数
algorithm 头文件下的常用函数 1. max(), min()和abs() //max(x,y)和min(x,y)分别返回x和y中的最大值和最小值,且参数必须时两个(可以是浮点数) //返回3 ...
- linux设备驱动程序该添加哪些头文件以及驱动常用头文件介绍(转)
原文链接:http://blog.chinaunix.net/uid-22609852-id-3506475.html 驱动常用头文件介绍 #include <linux/***.h> 是 ...
- algorithm头文件下的常用函数
algorithm头文件常用高效函数 max() max(a, b)返回a和b中的最大值,参数必须是两个(可以是浮点型). 1 #include <iostream> 2 #include ...
- 头文件<cmath>中常用函数
<cmath>里面有很多数学函数,下面说一下常用的一些函数吧:直接把函数原型给了出来,用的时候注意参数 先说一下,c++自身是没有四舍五入函数round()的,若果你要用到的话,可以自己写 ...
- cctype头文件(字符处理库)的使用
C++ 中cctype头文件的使用 头文件cctype(字符处理库)中定义了有关字符判断与处理的库函数,使用前要包含头文件: #include <cctype> using namespa ...
- 定义与声明、头文件与extern总结
用#include可以包含其他头文件中变量.函数的声明,为什么还要extern关键字? 如果我想引用一个全局变量或函数a,我只要直接在源文件中包含#include<xxx.h> (xxx ...
- [转]extern与头文件(*.h)的区别和联系
用#include可以包含其他头文件中变量.函数的声明,为什么还要extern关键字? 如果我想引用一个全局变量或函数a,我只要直接在源文件中包含#include<xxx.h> (xxx. ...
- 定义与声明、头文件与extern总结(转)
本文转自: http://lpy999.blog.163.com/blog/static/117372061201182051413310/ http://blog.csdn.net/feitianx ...
- extern与头文件(*.h)的区别和联系
原文网址为:http://lpy999.blog.163.com/blog/static/117372061201182051413310/ 个人认为有一些道理:所以转过来学习了. 用#include ...
随机推荐
- c++ 面试注意的问题
1.输入数据合法性检查 2.变量命名 3.边界数据的检查 4.函数名,递归的思想[尤其是树.链表] 企业喜欢的人:聪明 努力 基础好 面试时不要主动请求提示,做题要大胆地想,及时与面试官沟通,防止想很 ...
- <基督教福音视频>
<信耶稣还是罪人吗?>全集 http://www.youku.com/playlist_show/id_18458615.html <因信称义>全集 http://www.yo ...
- 20145227&20145201 《信息安全系统设计基础》实验四
北京电子科技学院(BESTI) 实 验 报 告 课程:信息安全系统设计基础 班级:1452 姓名:(按贡献大小排名)鄢曼君 李子璇 学号:(按贡献大小排名)20145227 20145201 成绩: ...
- Tempter of the Bone
Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he ...
- Markdown使用指南(1)——基础语法
[TOC] Markdown使用指南 标题 # 这是一级标题 ## 这是二级标题 ### 这是三级标题 ###### 这是六级标题 引用 > 这是一级引用 >> 这是二级引用 > ...
- JavaScript 跳坑指南
JavaScript 跳坑指南 坑0-String replace string的replace方法我们经常用,替换string中的某些字符,语法像这样子 string.replace(subStr/ ...
- IntelliJ IDEA常用快捷键windows
1 Alt+回车 导入包,自动修正 Ctrl+N 查找类Ctrl+Shift+N 查找文件Ctrl+Alt+L 格式化代码 Ctrl+Alt+O 优化导入的类和包Alt+Insert 生成代码( ...
- php请求返回GeoJSON格式的数据
<?php /* * Following code will list all the products */ // array for JSON response $response = ar ...
- Linux and the Device Tree
来之\kernel\Documentation\devicetree\usage-model.txt Linux and the Device Tree ----------------------- ...
- Android SDK Tools 更新
C:\WINDOWS\system32\drivers\etc\hosts 文件用记事本打开后 添加下面的 74.125.237.1 dl-ssl.google.com