How to apply Opacity in IE8

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, is there a hack for this?

    
asked by anonymous 16.09.2014 / 16:04

2 answers

2

Taa

.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;
}

I could try something like this too:

filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4cFF0000,endColorstr=#4cFF0000);
    
16.09.2014 / 16:06
1

Try 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!

    
24.10.2016 / 14:56