css setting transparency (compatible with all browsers)

The css code is as follows:

.demo{
	filter:alpha(opacity=50);  
	-moz-opacity:0.5;  
	-khtml-opacity: 0.5;  
	opacity: 0.5;
	}

Note 1: After the transparency is set, the element and its child elements are transparent, and the transparency of the child elements cannot be removed, and must be consistent with the parent element.

Note 2: IE8 and above can be used.

Guess you like

Origin blog.csdn.net/HoD_DoH/article/details/124630294