Home> CMS Tutorial> DEDECMS> body text

How to use DD_belatedPNG to make IE6 support PNG transparent images

藏色散人
Release: 2020-01-09 09:31:48
Original
1703 people have browsed it

How to use DD_belatedPNG to make IE6 support PNG transparent images

How to use DD_belatedPNG to make IE6 support PNG transparent images?

Use DD_belatedPNG to make IE6 support PNG transparent images

Recommended learning:梦Weavercms

As we all know, IE6 does not support transparent PNG images. In terms of expressiveness in Web design, PNG images have effects that other graphic formats cannot achieve. This fatal flaw of IE6 greatly limits the creative expression of Web design.

Although there are many ways to solve the problem of transparent PNG in IE6, from using IE-specific filters or e-xpression to javascript transparent GIF replacement. However, these methods have a disadvantage, that is, they do not support CSS. background-position and background-repeat attributes.

The use of DD_belatedPNG.js can perfectly solve the problem of PNG image transparency under IE6, and supports background-position and background-repeat. This is not available in other methods. At the same time, DD_belatedPNG also supports the a:hover attribute. and.

Our website has added DD_belatedPNG to process navigation PNG transparent images so that it maintains the same appearance under different browsers.

Usage:

First download the JS file

http://www.028guzheng.com/793395_16370305896/DD_belatedPNG_0.0.8a.js
Copy after login

and then quote the code on the page:

Copy after login

The reference function is DD_belatedPNG.fix(), brackets Fill in the CSS selector for applying PNG (ID selector and class selector can be used) and application type (divided into img and background).

Such as DD_belatedPNG.fix(‘#box-one, img’) or DD_belatedPNG.fix(‘.header, background’) etc.

These can be abbreviated as DD_belatedPNG.fix(‘#box-one, .header, img,background’); .

More selectors such as DD_belatedPNG.fix(‘#box-one, .header,#footer,.box-two a:hover, img,background’); etc.

In addition, in order to solve the problem of background image flickering under IE6, you can add the following script to the page

  
Copy after login

The above is the detailed content of How to use DD_belatedPNG to make IE6 support PNG transparent images. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
png
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!