CSS implements background transparency, text opacity (compatible with various browsers), and css opacity
In FF/Chrome and other newer browsers, you can use the css attribute background-color rgba to easily achieve background transparency, while text remains opaque. The IE6/7/8 browser does not support rgba. It only uses the exclusive filter: Alpha of IE, but this write method also makes the text transparent, therefore, you can only set position: relative in the child node of the transparent container (except the text node) to not inherit the transparent filter of its parent element. The Code is as follows:
1 <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2
The above code is successfully tested in IE6.0 +/FF3.0 +/Opera10 +/Chrome/Safari.
How is the webpage background translucent and the words in the div opaque (compatible with all browsers)
Use the js framework. jquery and extjs are easy to implement. You will find more functions.
How can we make the divs translucent background layer automatically adapt to the height?
Remove the position: absolute; In the content. This is the absolute position.