Browser compatible with some finely hack opacity png pictures

Source: Internet
Author: User

Hack

IE6: _ Eg: _font-family:

IE7: * Eg: *font-family:

IE8: \9 eg:font-family: "Microsoft Yahei" \9;

Opacity

Ie:filter:alpha (OPACITY=50);

Safari:-khtml-opacity:0.5;

Moz:-moz-opacity:0.5;

When PNG images are set to translucent, the black edges are processed

Save Png-24 as Png-8

PNG picture with no background in the gray bottom of the IE6

Using IEPNGFIX.HTC

1, first download IEPNGIFX.HTC

2, put IEPNGFIX.HTC and blank.gif in the folder of the website

3, modify the IEPNGFIX.HTC in the blank.gif relative to the path of the HTML file, corresponding properties: Iepngfix blankimg, Eg:iepngfix blankimg = "Images/blank.gif";

4. Add this code to the CSS of the element that will function: Behavior:url (CSS/IEPNGFIX.HTC); The URL is the path to the file IEPNGFIX.HTC relative to the HTML file

5. Introduce iepngfix.js into HTML

Using DD Belatedpng.js

1. Download

2. Introduction of JS file into HTML

3, Call function Dd_belatedpng.fix (); The arguments in parentheses are the elements to take effect, either the class name or the ID, and so on.

4, can also directly in the Dd_belatedpng.js file, add window.onload=function () {dd_belatedpng.fix ();  }; Realize the separation of structure and behavior.

Both of these references work only under IE6, and we can write their introductions in <!--[if IE 6]><! [endif]-->

Browser compatible with some finely hack opacity png pictures

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.