Rollback999

How Do I Set Crossbrowser Opacity for My Navigation Bar?

Asked by Rollback999 2 years ago opacity


Joel Reyes
1
 
Crossbrowser opacity is one of those things everyone's just after, especially after the strong rise of CSS3. Here's the beautiful code that should allow you to obtain Crossbrowser compatibility for opacity:

.crossbrowseropacity
{
  background-color:#000;
  opacity: .75; /* W3C Standard: FF > 1.5, Opera, Safari */
  -khtml-opacity: .75; /* Safari 1.x */
  -moz-opacity: .75; /* FireFox<1.6 */
  filter: Alpha(opacity=75); /* IE<8 */
  -ms-filter: "alpha(opacity=75)"; /* IE8 */
}
.crossbrowseropacity *
{
/* CLEAR CHILDREN */
  background-color:#000;
  opacity: 1; /* W3C Standard: FF > 1.5, Opera, Safari */
  -khtml-opacity: 1; /* Safari 1.x */
  -moz-opacity: 1; /* FireFox<1.6 */
  filter: Alpha(opacity=100); /* IE<8 */
  -ms-filter: "alpha(opacity=100)"; /* IE8 */
}

by Joel Reyes 2 years ago

Answer this question

How Do I Set Crossbrowser Opacity for My Navigation Bar?

0 errors found:

 
0