Use CSS to make div translucent

Source: Internet
Author: User

Set div background is translucent, there is a good example below, using DIV+CSS to achieve under, no friend can refer to the next

Div{filter:alpha (opacity=80);-moz-opacity:0.5;opacity:0.5;}

Description
1, Filter: Set the translucent filter effect on win IE, Filter:alpha (opacity=80) represents the object 80% translucent, Firefox browser does not recognize
2,-moz-opacity: the Mozilla Firefox browser to achieve translucency, win IE do not recognize this attribute,-moz-opacity:0.5 equivalent to set the translucency 50%
3, opacity: all browsers except IE support including Google, put the last mainly for Google Browser, opacity:0.5; set 50% Translucent

To observe the semi-transparent implementation of DIV, we set up two div layers, one placed in another div layer, and the outer div named ". Div-a"; The above contained layer CSS class is named ". Div-b", which forms ". Div-b" box in ". Div-a"

We set a background for the underlying div is a picture, the div box above sets the village black.

Use CSS to make div translucent

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.