how to achieve transparent background in css?

0 votes
89 views
asked Oct 29, 2013 in CSS by Chanakya (545 points)

HI

    how to achieve transparent background in css?.

<p style="position:absolute; background-color:green; filter:alpha(opacity=60); opacity:.6;">
  <span style="color:white; filter:alpha(opacity=100); opacity:1;">
    Hello world
  </span>
</p>

1 Answer

0 votes
answered Oct 29, 2013 by john (4,220 points)

Either use a semi-transparent PNG image or use CSS3:

background-color:rgba(255,0,0,0.5);
...