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下测试就没通过
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值