Background transparency with css

There is a posibility to add transparency background with RGBa. You can use this for anything that can take the CSS color property. For example background: rgba(255, 255, 255, 0.5);. 0.5 is alpha. This property works in Firefox, Safari, Chrome, Opera, but nor in IE.

IE uses the syntax filter:alpha(opacity=50). The lower value of this makes the element more transparent.

For example:

.myclass
{
background:#000000;
filter:alpha(opacity=50);
}

There will be black background with 50% transparency.

Leave a Reply

Your email address will not be published. Required fields are marked *

three × 4 =