How to apply Opacity to IE8

Asked

Viewed 71 times

2

I have a line that applies an opacity in a Background, with this CSS:

.teste{background-color: rgba(27,18,9,0.9);}

We all know that IE8 does not accept opacity, there is some hack for this?

  • Opacity or RGBA? Opacity takes ALL the element and leaves it more or less transparent. RGBA, in this case, would render the background opaque but would not influence other elements within this element. RGBA does not work in IE8- : (

2 answers

2

Ta ai

.transparent_class {


-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; // first!
filter: alpha(opacity=50);                  // second!


  /* Netscape */
  -moz-opacity: 0.5;

  /* Safari 1.x */
  -khtml-opacity: 0.5;

  /* Good browsers */
  opacity: 0.5;
}

You could try something like this:

filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4cFF0000,endColorstr=#4cFF0000);
  • I tried, man, but it didn’t roll, look http://jsfiddle.net/1cc4zra2/

  • You are emulating or using the correct version ?

  • By the tests I did here since we developed with IE8 worked only with filter, but emulating does not work, only with the same browser

  • I am using IE8 directly from a virtual machine, using Virtual Box.

  • gave an edited see if help

  • I changed face, and not yet funfa http://jsfiddle.net/1cc4zra2/1/ I’m thinking about using one . transparent png, but I’d like to find out in the nail what the problem is.

  • I updated the code maybe it’ll help you

  • You updated on Jsfiddle?

  • not only the answer

  • No rolled friend, I think the ideal is I make a transparent png even.

  • I think it’ll be more practical, sorry I couldn’t help

  • Come on, man, thank you so much.

Show 7 more comments

1

Try it with this code.

.minha-classe {
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";   
    filter: alpha(opacity=50);
    -moz-opacity:0.5;
    -khtml-opacity: 0.5;
    opacity: 0.5;
}

Hugs!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.