Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

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.