是否有仅限Google Chrome浏览器的CSS黑客? [英] Is there a Google Chrome-only CSS hack?

查看:131
本文介绍了是否有仅限Google Chrome浏览器的CSS黑客?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有仅限Google Chrome浏览器的CSS黑客?
Lo和看,Mozilla正确地读。

Is there a Google Chrome-only CSS hack? Lo and behold, Mozilla reads it properly too. I searched ten times more but came up with nothing, so here I am.

推荐答案

当然是:

@media screen and (-webkit-min-device-pixel-ratio:0)
{ 
    #element { properties:value; } 
}

在操作中看到它有点儿麻烦 - http://jsfiddle.net/Hey7J/

And a little fiddle to see it in action - http://jsfiddle.net/Hey7J/

必须添加tho ...这是一般坏的做法,你不应该真的在你开始需要单独的浏览器黑客,使你的CSS工作的点。请尝试在项目开始时使用重置样式表,以帮助避免此问题。

Must add tho... this is generally bad practice, you shouldn't really be at the point where you start to need individual browser hacks to make you CSS work. Try using reset style sheets at the start of your project, to help avoid this.

此外,这些黑客可能不是未来的证明。

Also, these hacks may not be future proof.

这篇关于是否有仅限Google Chrome浏览器的CSS黑客?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆