CSS的IE6、IE7、FF兼容性写法
| blue;< /td> | Firefox 背景变蓝色 |
| red /9; | IE8 背景变红色 |
| *black;< /td> | IE7 背景变黑色 |
| _background:orange; | IE6 背景变橘色 |
#example { color: #333; } /* Moz */
* html #example { color: #666; } /*IE6 */
*+html #example { color: #999; } /* IE7 */
- color:red; /* 所有浏览器都支持 */
- color:red !important; /* 除IE6外 */
- _color:red; /* IE6支持 */
- *color:red; /* IE6、IE7支持 */
- +color:red; /*IE7支持*/
- *+color:red; /* IE7支持 */
- color:red\9; /* IE6、IE7、IE8、IE9支持 */
- color:red\; /* 针对所有IE */
- color:red\0; /* IE8、IE9支持 */
- color:red\9\0; /*IE9支持*/
- /* webkit and opera */
- @media all and (min-width: 0px){ div{color:red;} }
- /* webkit */
- @media screen and (-webkit-min-device-pixel-ratio:0){ div{color:red;} }
- /* opera */
- @media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) { div{color:red;} }
- /* firefox * /
- @-moz-document url-prefix(){ div{color:red;} } /* all firefox */
- html>/**/body div, x:-moz-any-link, x:default {color:red;} /* newest firefox */
- body:nth-of-type(1) p{color:red;} /* Chrome、Safari支持 */
- <!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
- <!--[if IE 7 ]> <html class="ie7"> <![endif]-->
- <!--[if IE 8 ]> <html class="ie8"> <![endif]-->
- <!--[if IE 9 ]> <html class="ie9"> <![endif]-->
- <!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
- <!-[if IE 7]> = 等于 IE7
- <!-[if lt IE 8]> = 小于 IE8(就是 IE7 或以下了啦)
- <!-[if gte IE 8]> = 大于或等于 IE8
- <meta http-equiv="x-ua-compatible" content="ie=7" />
- 把这段代码放到<head>里面,在ie8里面的页面解析起来就跟ie7一模一样的了
- <!-[if IE]>
- <link rel="stylesheet" href="/ie-all.css" type="text/css" media="screen" />
- <![endif]->
- <!-[if lt IE 8]>
- <link rel="stylesheet" href="/ie.css" type="text/css" media="screen" />
- <![endif]->
- <!-[if IE 7]>
- <link rel="stylesheet" href="/ie7.css" type="text/css" media="screen" />
- <![endif]->
- <!-[if IE 6]>
- <link rel="stylesheet" href="/ie6.css" type="text/css" media="screen" />
- <![endif]->
IE6以下
*html{}
IE 7 以下
*:first-child+html {} * html {}
只对IE 7
*:first-child+html {}
只对IE 7 和现代浏览器
html>body {}
只对IE 8(属性值后加/0)
.name {color:#ccc/0; }
只对现代浏览器(非IE 7)
html>/**/body {}
最新的Opera 9以下版本
html:first-child {}
Safari
html[xmlns*=”"] body:last-child {}
Firefox 3
.classname, x:-moz-any-link, x:default {}
#id, x:-moz-any-link, x:default {}
====================
所有浏览器下背景变灰(半透明)
body {filter:alpha(opacity=30);opacity:0.3;}
====================
区别IE6与FF:
background:orange;*blue;< /p>
区别IE6与IE7:
background:green !important;blue;< /p>
区别IE7与FF:
background:orange; *background:green;
区别FF,IE7,IE6:
background:orange;*background:green !important;*blue;< /p>
区别FF 3
“{”前加上“, x:-moz-any-link, x:default”,只有FF 3能识别
注:
IE都能识别*;标准浏览器(如FF)不能识别*;
IE6能识别*,但不能识别 !important,
IE7能识别*,也能识别!important;
只有IE8能识别/0
FF不能识别*,但能识别!important;
CSS的IE6、IE7、FF兼容性写法的更多相关文章
- CSS- ie6,ie7,ie8 兼容性写法,CSS hack写法
css ie6,ie7,ie8 兼容性写法,CSS hack写法 margin-bottom:40px; /*ff的属性*/margin-bottom:140px\9; /* IE6 ...
- div+css 布局下兼容IE6 IE7 FF常见问题
div+css 布局下兼容IE6 IE7 FF常见问题 收藏 所有浏览器 通用 (市面上主要用到的IE6 IE7 FF)height: 100px; IE6 专用 _height: 100px; IE ...
- CSS 在IE6, IE7 和IE8中的差别////////////////z
CSS 在IE6, IE7 和IE8中的差别 关于浏览器的最离奇的统计结果之一就是Internet Explorer 版本6,7和8共存.截至本文,Internet Explorer各个版本总共占据了 ...
- CSS兼容IE6 IE7 IE8 IE9 Firefox的总结
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- (转)Css样式兼容IE6,IE7,FIREFOX的写法
根据FF和IE对一些符号识别的差异,我们可以单独对FF以及IE定义样式,例子: 区别IE6与FF: background:orange;*background:blue; 区别I ...
- Css样式兼容IE6,IE7,FIREFOX的写法
根据FF和IE对一些符号识别的差异,我们可以单独对FF以及IE定义样式,例子: 区别IE6与FF: background:orange;*background:blue; 区别I ...
- css区分ie6,7,ff
IE6能识别*,但不能识别 !important,IE7能识别*,也能识别!important;FF不能识别*,但能识别!important; 可以这样区别FF,IE7,IE6: background ...
- css解决IE6,IE7,firefox兼容性问题
在当前IE6 IE7 FifeFox三分天下的情况下,浏览器兼容性问题成为网页设计者需要考虑的问题. 区别不同浏览器的CSS hack写法: 区别IE6与FF: background:orange;* ...
- DIV+CSS IE6/IE7/IE8/FF兼容问题汇总
1.IE8下兼容问题,这个最好处理,转化成ie7兼容就可以.在头部加如下一段代码,然后只要在IE7下兼容了,IE8下面也就兼容了 <meta http-equiv="x-ua-comp ...
随机推荐
- How do you render tooltip on disabled HTML Button
This idea's based on the following (x)html: <form><fieldset><buttondisabledtitle=&quo ...
- iOS 重力感应 学习1 陀螺仪 水平仪 指南针
小球可以随着重力感应 四处乱撞. 放大了坐标位移 就可以看见小球动了. 然后规定小球的路径 当滑到中间时候 弹出一张图片 作为提示. 我做了一个小demo 效果不错哦 CMMotionManager ...
- [ASP.NET] Session的了解
ASP.NET Session的使用当中我们会遇到很多的问题,那么这里我们来谈下经常出现的一些常用ASP.NET Session的理解: ASP.NET Session的七点认识之一 对于值类型的变量 ...
- TQ210开发板NFS挂载android4.0.4的rootfs的方法
首先声明的是,我使用的u-boot是自己移植的u-boot2013.01.01而非天嵌官方的那个,至于使用官方的u-boot如何去实现nfs挂载rootfs我没怎么研究过,不过原理方法都是一致的. 主 ...
- Sql Server触发器案例(初学者学习案例)
万事都是从最简单的一句“hello world”开始,所以我接下里介绍的sql触发器学习案例也从最简单的案例来说明分析: 1.首先创建表,这几张表你们也许很熟,在百度搜触发器案例都是使用这2张表 Cr ...
- Matplotlib之无GUI时的解决办法
需添加: import matplotlib as mpl mpl.use('Agg') 而且必须添加在import matplotlib.pyplot之前,否则无效
- 一步步搭建自己的轻量级MVCphp框架-(二)一个国产轻量级框架Amysql源码分析(1)
这个框架是我一个做PHP的朋友“祥子”介绍给我的,Git地址https://coding.net/u/srar/p/AMP/git 下面从入口文件 总线程 ( index.php )开始进行分析 &l ...
- [CAMCOCO][C#]我的系统架构.服务器端.(二)----DATA层
这一层在园子里有很多很多的介绍了,这层写好之后老胡也没多研究,基本上就是参考的园子里大咖们的写法,具体的说明老胡也细说不了了,把接口和思路简单描述一下就好,如果有问题还是那句话,感谢您不吝赐教,老胡这 ...
- HDU 5437 Alisha’s Party (优先队列)——2015 ACM/ICPC Asia Regional Changchun Online
Problem Description Princess Alisha invites her friends to come to her birthday party. Each of her f ...
- Jsp万能密码漏洞修复例子
更多详细内容请查看:http://www.111cn.net/jsp/Java/58610.htm 如果网站出现这种“万能密码”漏洞该怎么办呢 'or'='or' 漏洞修复 方法有很多在这里介绍两种, ...