<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>html5标签的兼容</title>
<style type="text/css">
body{margin: 0}
header{height: 100px;background: #9f3}
article{padding: 10px;background: #cf6;overflow: hidden;zoom:1;position: relative;}
aside{width: 200px;height: 300px;background: #f06;position: absolute;left: 10px;top:10px;}
section{margin-left: 210px;background: #ddd;height: 300px;}
footer{height: 100px;background: #de6}
leo{height: 100px;background:#f03;display: block;}
</style>
</head>
<body>
<header>页面头部</header>
<article>
<aside>侧边栏</aside>
<section>内容区域</section>
</article>
<footer>页面的底部</footer>
<leo>朴树清白之年</leo>
</body>
</html>
- 针对IE浏览器比较好的解决方案是html5shiv。html5shiv主要解决HTML5提出的新的元素不被IE6-8识别
- html5shiv的使用非常的简单,考虑到IE9是支持html5的,所以只需要在页面head中添加如下代码即可:
<script type="text/javascript" src="js/html5shiv.js"></script>
,