IE6 PNG Transparent DD

Source: Internet
Author: User
Tags add http request
Currently the most popular and practical IE6 support PNG pictures of the program, for everyone to learn the reference!
We all know that the PNG photo-transparent solution currently used is basically using filters, xpression solutions, and transparent GIF replacements. But these methods have a disadvantage, that is, do not support backgrond-position and background-repeat in CSS. And the JS plug-in using Microsoft's VML language to draw and do not need to introduce other files, a small JS can be a perfect solution PNG image bug even the img tag and hover pseudo class can also be a good solution. train of Thought: 1, first download the file used in this scheme, dd_belatedpng.zip Download    2, the introduction of just downloaded JS file, also because this JS only use IE6, so in order to make our page more efficient execution, we can modify the above code as follows, only IE6 when the call to execute this javascript:       3, call function, set parameters as follows:        dd_belatedpng.fix ("#pngImg, #pics, #picsRepeat");       The parameters passed in are the ID, class style, and label name of the label for the PNG picture you are using, as well as the following to write        dd_belatedpng.fix ("# Content img ");     This method means that all of the IMG tags under #content       If the hover of links and links is set to be transparent, then you write as follows, and in some versions you do not need to add: Hover directly write selector, but for insurance, we still add: hover:     Dd_belatedpng.fix ("#links, #link: hover");     Write here and you have used jquery or Cssquery class library, then you must be familiar with the above selection method, in short, in the CSS you are the choice of elements, then in this JS function (method) to pass what, but more than one choice, You can use commas to separate them.       Tips for using this method: If there is a lot of png,dd_belatedpng.fix () in the page, isn't the parameter of the function very long? We can use this notation:    dd_belatedpng.fix (". Pngfix,.pngfix:hover"); If you use the above wording, our HTML only need to add class= "PngFix" on the corresponding label, if there are more than one class style, according to the usual style of multiple classes can be class= "ABC CBC PngFix"       when using this method, we have to load two JS files or write two
Related Article

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.