Meta 标签该定义点啥?

Posted by Mars . Modified at

1.视口宽度(!important  决定了页面在移动端显示效果)

<meta name="viewport" content="device-width , initial-scale=1">

2.字符集

<meta charset="utf-8">

3.IE渲染引擎

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

4.描述信息

<meta name="description" content="description">

5.作者

<meta name="author" content="Mars">

6.关键词

<meta name="keywords" content="Mars,blog,page">

7.http-equiv 信息

<meta http-equiv="http-equiv-type" content="content">

http-equiv 属性值 content 作用
expires GMT 时间 设定到期时间,过期重新下载
Pragma no-cache 设定禁止浏览器从本地机的缓存中调阅页面内容,设定后一旦离开网页就无法从Cache中再调出(无法脱机浏览)
Refresh 毫秒数; URL=<url> 自动刷新并指向新页面
Window-target _top 强制页面在当前窗口以独立页面显示
Page_Enter、Page_Exit revealTrans(duration=1.0,transtion=12) 设定进入页面时的特殊效果
cache-control no-cache 清除缓存(再访问这个网站要重新下载)
Keywords: HTML
previousPost nextPost
已经有 1000000 个小伙伴看完了这篇推文。