css区分ie6 ie7 ie8 ff浏览器,css hack写法,嘉兴网站建设将自己知道的总结一下,尽量全面一点,以便对初学技术人员有所帮助。
注意下面介绍的这些hack写法仅适用于xhtml1.0。如果没有在html最前加上
<!doctype html public -//w3c//dtd xhtml 1.0 transitional//en http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd><html xmlns=http://www.w3.org/1999/xhtml>
此外,这里所说的ie8,不是指ie8的兼容模式,因为ie8的兼容模式其实就是ie7。
让ie8执行ie7效果:(嘉兴做网站)
可以在头部<head></head>之间加上
<meta http-equiv=x-ua-compatible content=ie=7 />
区别ie6、7与ff/ie8:
background:blue;*background:orange;
引用
显示效果:
ie 6/7:orange
ff/ie8:blue
原理:ff/ie8不支持*开头,而ie6/7都支持。
区别ie6与ie7/ie8/ff:(嘉兴做网站)
background:green;_background:blue;
引用
显示效果:
ie7/8/ff:green
ie6:blue
原理:ie6支持下划线_,ie7、8和firefox均不支持下划线。
区别ff/ie8和ie6/7:(嘉兴网站建设)
background:orange;+background:green;-background:blue;
或者
background:orange;*background:green!important;*background:blue;
引用
显示效果:
ie6:blue
ie7:green
ff/ie8:orange
原理:ie6能识别-,ie7能识别+,ie8和ff都不能识别+和-
ie8/ff都不识别*,ie7优先识别!important,ie6不能识别!important。
关于ie8的hacks:
.test{
color:/*\**/#00f\9; /* ie8 only */
color:#00f\9; /* 适用于所有ie版本 */
}
可同时区分ie8、ie7、ie6、firefox的css hacks:
.test{
color:#000; /* firefox */
color:/*\**/#00f\9; /* ie8 */
*color:#f00; /* ie7 */
_color:#0f0; /* ie6 */
}
有哪些容易让企业认可的网站设计思路嘉兴企业网站建设的哪些关键字不太适合选择优化手段网页设计流程是什么?建设商城网站必备的几大模块网站如何一下打动你 外观设计很重要设计制作竞价单页网站需注意什么事项说说我对企业网站建设作用的看法如何进行网站SEO优化工作 从哪些方面入手