CSS makes block semi-transparent method, compatible IE6

Source: Internet
Author: User
Objective

Today LOL play robot play really bad, really crash, or visit the blog Park more cool, record their growth. To tell you the truth, I am really a rookie in programming, food to a kind of super God, not the same as their own special good, sad reminders ...

Less nonsense, to get to the point, HTML5 and CSS3 rapid development, many of the things that have been very troublesome in the past now become very simple, such as today's translucent effect, in the CSS3 now have a opacity this style, can be very simple settings, but very sad reminders, Earlier IE and not very new version of the browser is not compatible, today to tell you a new way, rookie grow ing ie and Firefox

Firefox--background:rgba (0,0,0,0.5)

I E--filter:alpha (opacity=50) or use

Filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr= #7f000000, endcolorstr= #7f000000)

The above method with transparency of 0.5 set, ie in the #7f000000 7f is 0.5 converted into 16 of the value, of course, I prefer ie the latter way, it can be compatible to IE6

Look at the effect chart:

Conclusion

Make a good effort, Vito, come on, grow up little rookie ...

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.