HTML-CSS: cross-browser translucency

I have to make the background of my fading menu items translucent.

It should be gray, but still I need to see what is lower.

What is a simple cross-browser solution for translucency? (Perhaps without using images)

thank

+3
source share
2 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/

+5
source
+5
source

Source: https://habr.com/ru/post/1746030/


All Articles