Opera 12的CSS特定规则? [英] CSS specific rule for Opera 12?

查看:205
本文介绍了Opera 12的CSS特定规则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很多时候,我需要使用浏览器特定的CSS规则,使每个浏览器的设计看起来一样。

Many times I need to use browser specific CSS rules to make the design look alike in every browser. Generally I need them for IE 7-8, but this time is for Opera, specifically Opera 12 and on.

我为Opera找到了一些解决方案:

I found some solutions for Opera:

  • How to make CSS visible only for Opera 11 - Opera 11 CSS Hack
  • How to make CSS visible only for Opera

但这些仅适用于11或以下...

But these only work for 11 or below...

Opera 12有解决方案吗?

Is there a solution for Opera 12?

推荐答案

这是一个官方推荐的Opera恶意软件(如果 p>

Here is an officially recommended hack for Opera (in case everything else fails):

doesnotexist:-o-prefocus, .example {
  color: red;
}

http://www.opera.com/docs/specs/presto2.12/css/o-vendor/

通过: http://stackoverflow.com/a/4021618

ps: davehale32 发布通知评论,此黑客不适用于IE6 。我现在没有IE6,所以我不能确认或否认。

p.s.: notice comment by davehale32, that this hack does not work for IE6. I have no IE6 at my disposal now, so i can't confirm or deny that.

这篇关于Opera 12的CSS特定规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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