当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

question about IE filter: alpha(opacity=50); command

  • 1 件の返信
  • 17 人がこの問題に困っています
  • 9 回表示
  • 最後の返信者: cor-el

more options

I am trying to program web code across multiple browsers: Internet Explorer, Firefox, Google Chrome, Opera and Safari. The firefox css rule

{opacity: 0.5;}

will not run on internet explorer, which requires

filter: alpha(opacity=50);

which throws an error in firefox.

Without leaving css, is there a way to include one opacity command, or a number of them while producing no errors, in an html script web file?

I am trying to program web code across multiple browsers: Internet Explorer, Firefox, Google Chrome, Opera and Safari. The firefox css rule {opacity: 0.5;} will not run on internet explorer, which requires filter: alpha(opacity=50); which throws an error in firefox. Without leaving css, is there a way to include one opacity command, or a number of them while producing no errors, in an html script web file?

すべての返信 (1)

more options

It is not really a problem that the unrecognized filter code shows as an error in the Tools > Error Console. Firefox will ignore rules that are not recognized.

You need to add both rules or maybe more, if Safari or Opera also require their own code, if you want to support all browsers. You can do some browser sniffing for Gecko and load a specific stylesheet for Firefox, but that shouldn't be needed in most cases.