HTML5学习碎片
http://www.cnblogs.com/xiaoshatian/archive/2011/02/14/1954032.html
春节在家读了两本介绍HTML5的书:《HTML5 Up and Running》和《Pro HTML5 Programming》,得益于Kindle的便捷,一边读一边标注了一些内容,随感觉而标记,不成体系,所以称之为“碎片”,记录于此作为存档。 根据这个原理,有人写了一段脚本来让老版本的IE支持HTML5标签: 或者直接在线引用这段脚本:
document.createElement(“article”)
<!--[
if
lt IE 9]>
<script>
var
e = (
"abbr,article,aside,audio,canvas,datalist,details,"
+
"figure,footer,header,hgroup,mark,menu,meter,nav,output,"
+
"progress,section,time,video"
).split(
','
);
for
(
var
i = 0; i < e.length; i++)
{
document.createElement(e[i]);
}
</script>
<![endif]—>
<!--[
if
lt IE 9]>
<script src=
"http://html5shiv.googlecode.com/svn/trunk/html5.js"
></script>
<![endif]-->
<!DOCTYPE HTML>
<
time
datetime
border-top-left-radius: 0px 0px !important; border-top-right-radius: 0px 0px !important; border-bottom-right-radius: 0px 0px !important; border-bottom-left-
发表评论