html中的meta详解

2020-12-13 04:10

阅读:442

标签:des   style   blog   class   code   c   

转自http://www.cnblogs.com/javaee6/p/3730750.html

1  name=viewport

meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />

1、width : 控制viewport的大小,可以指定一个值,如600, 或者特殊的值,如device-width为设备的宽度(单位为缩放为100%的CSS的像素)

2、height : 和width相对应,指定高度

3、initial-scale : 初始缩放比例,页面第一次加载时的缩放比例

4、maximum-scale : 允许用户缩放到的最大比例,范围从0到10.0

5、minimum-scale : 允许用户缩放到的最小比例,范围从0到10.0

6、user-scalable : 用户是否可以手动缩放,值可以是:①yes、 true允许用户缩放;②no、false不允许用户缩放

2  meta中的name属性

soscw.com,搜素材

meta  name="Generator"  content="">     
 
meta  name="Keywords"    content=""> 

meta name="Description"  content=""> 
    
meta  name="Author"    content="你的姓名">
meta  name="Robots"    content= "all|none|index|noindex|follow|nofollow">
soscw.com,搜素材

3  meta中的 http-equiv属性

soscw.com,搜素材

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

meta http-equiv="Refresh"  content="n;url=http://.......>


="no-cache">
 -- //告诉浏览器不要缓存页面-->
meta http-equiv="cache-control" content="no-cache">//告诉浏览器不要缓存页面

meta http-equiv="expires" content="0">

meta http-equiv="X-UA-Compatible" content="IE=7">
soscw.com,搜素材

4 html5中更多的meta与link

soscw.com,搜素材
DOCTYPE html> 
html lang="zh"> 
 
head>
meta charset="UTF-8">
 
meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 
meta name="renderer" content="webkit|ie-comp|ie-stand"> 



meta name ="viewport" content ="initial-scale=1.0, maximum-scale=3, minimum-scale=1, user-scalable=no">
 
meta name="apple-mobile-web-app-title" content="标题"> 
 
meta name="apple-mobile-web-app-capable" content="yes" /> 
 
meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> 
 
meta name="format-detection" content="telephone=no" /> 


link type="image/x-icon" rel="icon" href="http://static.example.com/favicon.ico"/>
link type="image/x-icon" rel="shortcut icon" href="http://static.example.com/favicon.ico"/>
link type="image/x-icon" rel="bookmark" href="http://static.example.com/favicon.ico"/>



link rel="apple-touch-icon-precomposed" href="http://wanke.etao.com/assets/img/icon/57/apple-touch-icon-57x57-precomposed.png" />

link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://wanke.etao.com/assets/img/icon/72/apple-touch-icon-72x72-precomposed.png" />

link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://wanke.etao.com/assets/img/icon/114/apple-touch-icon-114x114-precomposed.png" />

 
meta name="msapplication-TileColor" content="#000"/> 
meta name="msapplication-TileImage" content="icon.png"/> 


meta name="description" content="" /> 
meta name="keywords" content=""/> 
title>页面标题title>



link rel="apple-touch-startup-image" sizes="1024x748" href="img/splash-screen-1024x748.png" />

link rel="apple-touch-startup-image" sizes="768x1004" href="img/splash-screen-768x1004.png" />

link rel="apple-touch-startup-image" href="img/splash-screen-320x480.png" />

link rel="apple-touch-startup-image" sizes="640x960" href="img/splash-screen-640x960.png" />


head>
soscw.com,搜素材

html中的meta详解,搜素材,soscw.com

html中的meta详解

标签:des   style   blog   class   code   c   

原文地址:http://www.cnblogs.com/shuishuowobushihuiyuan/p/3732020.html


评论


亲,登录后才可以留言!