Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML - CSS: cross-browser semi-transparency

Tags:

html

css

I've to make the background of my fading-in menu items semi-transparent.

It has to be grey but still I need to see what's below it.

What's an easy cross-browser solution for semi-transparency ? (Possibly without using images)

thanks

like image 977
aneuryzm Avatar asked Jul 20 '26 01:07

aneuryzm


1 Answers

selector {
    filter: alpha(opacity=50); /* internet explorer /
    -khtml-opacity: 0.5;      / khtml, old safari /
    -moz-opacity: 0.5;       / mozilla, netscape /
    opacity: 0.5;           / fx, safari, opera */
}

http://perishablepress.com/press/2009/01/27/cross-browser-transparency-via-css/

like image 94
Alec Avatar answered Jul 22 '26 16:07

Alec



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!