网页制作 
首页 > 网页制作 > 浏览文章

html meta用法示例介绍

(编辑:jimmy 日期: 2024/10/3 浏览:3 次 )
示例用法

复制代码代码如下:
<!DOCTYPE html>
<!--[if lt IE 7]><html class="ie6"><![endif]-->
<!--[if IE 7]><html class="ie7"><![endif]-->
<!--[if IE 8]><html class="ie8"><![endif]-->
<!--[if IE 9]><html class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html class="w3c">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<title>tinyCss--my css study tidy</title>
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<meta content="my css study tidy" name="description" />
<meta content="css,tidy" name="keywords" />
<meta content="index,follow" name="robots" />
<meta content="tinycss" name="application-name" />
<meta content="no-cache" http-equiv="Cache-Control" />
<meta content="-1" http-equiv="Expires" />
</head>
<body></body>
</html>

[code]
提示一:

viewport, 当你的页面有宽度时,比如宽度为1000px,设定width=1000, 兼容性会更好些。

提示二:

X-UA-Compatible, 此属性仅为ie8浏览器识别,让ie8用ie7的模式渲染是一种常见的应用;这样:content="IE=7";不用这个meta会是比较好的建议,因为毕竟ie8...。

提示三:

Expires:文档过期时间,过了这个时间就需要从服务器从新请求,而不可以用缓存;content="-1"理论上是禁用缓存的。
上一篇:使用thead、tfoot、 tbody制作一个表格
下一篇:顶部固定div可设置半透明效果
一句话新闻
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。