The official version of IE8 has been coming out for a while, but there are few CSS hack for the official version of IE8. In fact, this is fortunate because IE8 has fixed many bugs in IE6 and IE7, closer to W3C standards.
CSS hack for the official IE8 version can be found in two types:
First: "\ 9 ″:
Basic statement:
1.
. Test {color
/*\**/
:
Blue
\
9
}
IE6, IE7, and IE8 can both be identified. However, IE8 cannot recognize CSS hack of "*" and "_". Therefore, we can write hack as follows:(Reprinted
1.
. Header {
Width
:
300px
;}
/* All browsers */
2.
. Header {width
/*\**/
:
330px
\
9
;}
/* All IE browsers */
3.
. Header {*
Width
:
310px
;}
/* IE7 and IE6 can be identified, while IE8 and FF cannot */
4.
. Header {
_ Width
:
290px
;}
/* IE6 can recognize, IE7, IE8, and FF cannot recognize */
The second method is to use the conditional annotation of IE.
For details, refer to http://www.css88.com/archives/705;
Other CSS hack tests:
1.
. Color
1
{
Color
:
# F00
; Color
/*\**/
:
# 00f
/*\**/
}
/* IE6, IE7, IE8, FF, op, and SA recognition */
2.
. Color
2
{
Color
:
# F00
; Color
/*\**/
:
# 00f
/* \ 9 **/
}
/* IE7, IE8, FF, op, and SA recognition */
3.
. Color
3
{
Color
:
# F00
; Color
/*\**/
:
# 00f
\
9
}
/* IE6, IE7, and IE8 recognition */
4.
. Color
4
{
Color
:
# F00
; Color
/*\**/
:
# 00f
\
9
}
/* IE7, IE8 recognition */
/* "Color" and "/* \ **/
There is a space between them */
OP indicates opera, sa indicates Safari
Refer:
Http://ladysign-apps.com/blog/archives/529
Http://webdevelop.nitamihai.com/ie8-css-hack/
difference between CSS hack-www.newcss.cn of IE6, IE7, IE8, and Firefox
test the cube hi.baidu.com/dpxdqx
IE6
IE7
IE8
firefox