首页 > 开发 > CSS > 正文

CSS Hack(Safari、Opera、Firefox3和IE7)

2024-07-11 08:22:05
字体:
来源:转载
供稿:网友

1、仅 safari 和 opera 识别的 hack

@media all and (min-width: 0px)
{/* safari and opera  rules here */}

或者

@media screen and (-webkit-min-device-pixel-ratio:0)
{/* safari and opera rules here */}

注:这里所指代的 safari 和 opera 一般为最新版本。

2、仅 firefox 3 和 ie7 识别的 hack

selector, x:-moz-any-link, x:default
{/* firefox 3  and ie7 rules here */}

使用方法例:

@media screen and (-webkit-min-device-pixel-ratio:0)
{
.box{width:100px;}
/* safari and opera rules here */
}

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表