CSS transparency settings (compatibility) and css transparency

Source: Internet
Author: User

CSS transparency settings (compatibility) and css transparency

Make sure that the background is transparent in one sentence!

1 .transparent_class {   2       filter:alpha(opacity=50);   3       -moz-opacity:0.5;   4       -khtml-opacity: 0.5;   5       opacity: 0.5;   6 } 

 

UPDATE:I wanted to pull this post out of the archives and update it a bit because it there seems to be a good amount of interest in this subject.

Here is what each of those CSS properties is:

    • Opacity: 0.5;This is the "most important" one because it is the current standard in CSS. this will work in most versions of Firefox, Safari, and Opera. this wocould be all you need if all browsers supported current standards. which, of course, they don't.
    • Filter: alpha (opacity = 50 );This one you need for IE.
    • -Moz-opacity: 0.5;You need this one to support way old school versions of the Mozilla browsers like Netscape Navigator.
    • -Khtml-opacity: 0.5;This is for way old versions of Safari (1.x) when the rendering engine it was using was still referred to as KTHML, as opposed to the current WebKit.

PS: This article

Related Article

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.