视码如命

header section footer ie6,7,8兼容

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="js/html5shiv.js"></script>
<!--<script>
/*
由于ie6下支持 header section footer这些增加的h5标签,一次需要 创建响应的节点
但是创建的节点是内敛元素,所以在支持宽和高的,因此要想支持宽和高需要 把创建的节点转化成为
块级元素,因此,在css样式中需要display:block 一下。
*/
document.createElement("header");
document.createElement("section");
document.createElement("footer");
</script>-->
<style>
header{
width: 200px;
height: 200px;
display: block;
 
}
section{
width: 150px;
height: 150px;
display: block;
 
}
footer{
width: 100px;
height: 100px;
display: block;
 
}
</style>
</head>
<body>
<header>header</header>
<section>section</section>
<footer>footer</footer>
</body>
</html>
 

posted on 2016-10-31 11:33  视码如命  阅读(49)  评论(0编辑  收藏  举报

导航