HTML
(重定向自XHTML)
meta 标记
刷新页面
<meta http-equiv="refresh" content="x; url=*">
浏览器
使网站能以Google Chrome Frame浏览。
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
维护页面
当网站维护时,可使用如下标记:[1]
<meta name="refresh" content="60">
<meta name="retry-after" content="100">
<meta name="robots" content="noindex, nofollow, noarchive, nostore">
<meta name="cache-control" content="no-cache, no-store">
<meta name="pragma" content="no-cache">
表单
form的align属性,Opera、Google Chrome、Safari 支持,火狐(16)、IE 8 不支持。
与XHTML的区别
以下代码在HTML中会使<td>中的元素显示在窗口中央,但是在XHTML中并不会垂直居中:
<body>
<table style="width:100%;height:100%;">
<tr>
<td style="text-align:center;vertical-align:middle;">
</td>
</tr>
</table>
</body>
浏览器兼容性
对于<img />标签的usemap属性,其它浏览器能够使用id,Google Chrome只支持name。[2]
CSS source
.latex {
font-family: Times, "Times New Roman", serif;
letter-spacing: 1px;
}
.latex sup {
text-transform: uppercase;
letter-spacing: 1px;
font-size: 0.85em;
vertical-align: 0.15em;
margin-left: -0.36em;
margin-right: -0.15em;
}
.latex sub {
text-transform: uppercase;
vertical-align: -0.5ex;
margin-left: -0.1667em;
margin-right: -0.125em;
font-size: 1em;
}
.latex .reverse {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-moz-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
-o-transform: rotate(180deg); /* Opera 10.50+ */
-ms-transform: rotate(180deg); /* IE 9+ */
transform: rotate(180deg);
display: inline-block; /* Chrome 不支持 inline 元素,囧。。。 */
}
XHTML source
<span class="latex">T<sub>e</sub>X</span>
<span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>
<span class="latex">X<sub class="reverse">e</sub>T<sub>e</sub>X</span>
注:如果浏览器不支持旋转,可以使用Ǝ代替反向的E。
注意在 Google Chrome 中,复制使用 CSS 改成的大写的字母,将得到大写的字母。
参见
外部链接
- URL的井号 - 阮一峰的网络日志
- Jade - Template Engine
- How to refresh favicon in a browser?
- HTML5 Charset能用吗? | Tips | 前端观察
- HTML代码简写法:Emmet和Haml - 阮一峰的网络日志
- 有趣的a标签之href属性_Alien的笔记, 展示了不同 URL 写法时不同浏览器实际使用的链接地址。另见从“黑掉Github”学Web安全开发 | 酷 壳 - CoolShell.cn