首页 > 其他 > 详细

浏览器兼容

时间:2015-07-20 15:51:44      阅读:227      评论:0      收藏:0      [点我收藏+]

1、

可以先使用“\9"标记,将IE分离出来,再用”*"分离出IE6/IE7,最后可以用“_”分离出IE6

.type{
color: #111; /* all */

color: #222\9; /* IE */

*color: #333; /* IE6/IE7 */
_color: #444; /* IE6 */
}
一般来说,只有IE6不支持 !important
所以可以这样
#example{
width: 100px !important; /* IE7 FF */
width: 110px; /* IE6 */

因为!important 具有最高优先级,所以此种方式可以区别出来~

-------------------------------------------------------------------------------------------------

2、

H5兼容低版本浏览器:
1、
<!DOCTYPE html>后加:
<!--[if lt IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en" class="no-js"> <!--<![endif]-->

2、引入Modernizr的JS文件

3、min-height问题:

如果我们要设置一个标签的最小高度200px,需要进行的设置为:{min-height:200px; height:auto !important; height:200px; overflow:visible;}

4、i的点击事件只有iphone支持,要换成span.

浏览器兼容

原文:http://www.cnblogs.com/lily2015/p/4661410.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!