1) 对部分css3的支持 =》方法 使用插件 css3pie.htc
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
.box{
position:relative;
z-index: 2;
width: 200px;height: 200px;
border:2px solid #ccc;
border-radius: 50%;
behavior: url(./css/PIE.htc);
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
2)让ie8支持媒体查询 使用 response.js 处理这个问题
3)识别h5标签 使用 html5shiv
---------------------------------样式分界线-------------------------------------------
1) max-width 问题
2)placeholder不支持
解决方法 引入jquery.placeholder.js去解决
3)兼容 display:inline-block的方法
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
ul li{
list-style: none;
display: inline-block;
*display:inline;
*zoom:1;
padding: 5px 10px;
border:1px solid #ccc;
}
</style>
</head>
<body>
<ul>
<li>笑嘻嘻</li>
<li>笑嘻嘻</li>
<li>笑嘻嘻</li>
</ul>
</body>
</html>
4)不支持last-child 解决方案 给最后元素加类名
5)background-size ie8不支持 解决方案:滤镜
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
.box{
width: 500px;height: 500px;border:3px solid #ccc;
background: url("images/bb1.jpg") no-repeat;
background-size: cover;
/*background: none\9;*/
/*下一行为关键设置*/
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/bb1.jpg', sizingMethod='scale');
}
</style>
</head>
<body>
<div class="box">
</div>
</body>
</html>
---------------js兼容------------------------------------------------
es6用babel解析
无法使用forEach string.trim 自己写一个方法