针对于ie不同版本的引入相对应的css样式
2014-07-01 11:29
134 查看
一。根据不同浏览器的引入不同的css文件
对ie6-8在html中添加no-css3类和各个版本的class,对ie7以下添加lte7这个class。
二。判断浏览器,添加所需文件
参考:http://www.w3cplus.com/framework/index.php
对ie6-8在html中添加no-css3类和各个版本的class,对ie7以下添加lte7这个class。
<!DOCTYPE HTML> <!--[if IE 6]><html class="ie6 lte9 lte7 no-css3" lang="zh-cn"><![endif]--> <!--[if IE 8]><html class="ie8 lte9 no-css3" lang="zh-cn"><![endif]--> <!--[if IE 9]><html class="ie9 lte9 no-css3" lang="zh-cn"><![endif]--> <!--[if IE 7]><html class="ie7 lte9 lte7 no-css3" lang="zh-cn"><![endif]--> <!--[if !(IE 6) | !(IE 7) | !(IE 8) | !(IE 9) ]><!--><html lang="zh-cn"><!--<![endif]--> <head> <meta charset="UTF-8"> <title>标题</title> </head> <body> </body> </html>
二。判断浏览器,添加所需文件
//为ie6-8添加一个ie.css文件 <!--[if lte IE 8]><link href="css/ie.css" type="text/css" rel="stylesheet" media="all"><![endif]--> //为ie6添加处理png的js文件 <!--[if IE 6]> <script type="text/javascript" src="js/DD_belatedPNG_0.0.8a-min.js?_v=<%=JS_VERSION%>"></script> <script type="text/javascript"> //给所有需要处理的png图片加上dd-pngifx这个class,就可以处理了 DD_belatedPNG.fix(".dd-pngfix"); </script> <![endif]-->
参考:http://www.w3cplus.com/framework/index.php
相关文章推荐
- css样式解决不同IE版本之间的兼容问题
- 判断不同的ie 版本,可引入不同的css,做到分级支持
- 转《针对不同版本的ie调用不同css样式》
- 针对不同版本的IE调用不同CSS样式
- ie chrome firfox css兼容-iecss样式修复-针对特定浏览器引入对应的css
- 不同IE版本,引入不同的js文件。两种实现方式
- web兼容---ie8、9、10、11hack、注释ie版本css样式hack
- DIV CSS在不同IE版本和FF以及Chrome中的兼容性差异解决方法(推荐)
- 不同版本的ie同时存在
- 不同版本IE使用不同css(css条件注释语句用法)
- DIV+CSS与不同IE版本等的兼容性
- 介绍一下标准的CSS的盒子模型?低版本IE的盒子模型有什么不同的?
- 浅析py-faster-rcnn中不同版本caffe的安装及其对应不同版本cudnn的解决方案
- android SQLite 批量插入数据慢的解决方案 (针对于不同的android api 版本)
- Angular不同版本对应的Bootstrap组件
- CSS样式如何解决IE浏览器不同版本的兼容问题
- 触摸事件--兼容不同浏览器及不同IE版本
- 不同版本vpb与osg对应关系
- 对于IE 10 以下版本placeholder的兼容性解决方案
- 明明想在学校中请一些同学一起做一项问卷调查,为了实验的客观性,他先用计算机生成了N个1到1000之间的随机整数(N≤1000),对于其中重复的数字,只保留一个,把其余相同的数去掉,不同的数对应着不同的学生的学号。然后再把这些数从