css hacks

某些情况下需要让IE和FF显示不一样的CSS属性,方法自然是多种的,可以用JS来控制,也可以进行CSS HACKS。
   CSS HACKS 有2中方法:
     1.<!--[if gte IE 6]>
<link rel="stylesheet" href="../includes/IEFix.css" type="text/css" />
<![endif]-->这种注释类的方法很好用.
The syntax for conditional comments is as follows:

Positive
<!--[if condition]> HTML <![endif]-->
Negative
<!--[if !condition]><![IGNORE[--><![IGNORE[]]> HTML <!--<![endif]-->
condition is one of the following:

IE
Any version of IE
lt IE version
Versions less than version
lte IE version
Versions less than or equal to version
IE version
Only version version
gte IE version
Versions greater than or equal to version
gt IE version
Versions greater than version
version is the version of Internet Explorer, typically 5, 5.5, 6, or 7

    2.第2种方法是用*来连接需要在IE下显示的CSS
    /* IE Fix */
* .content2 {
display: inline-block;
}这个方法不一定好用,我今天在FF3.5下测试就没通过

你可能感兴趣的:(html,css,IE)