Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the opaque background of PNG Picture in IE6 by HTML

Shulou Source: shulou.com Published: 2022-06-01 04:05:25 09月22日 Update

This article mainly explains "HTML how to achieve the opaque background of PNG pictures in IE6", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "HTML how to achieve PNG pictures in IE6 opaque background" bar!

1. Solve the CSS and JS code with opaque background of PNG image in IE6

JS code

Function correctPNG () / / correctly handle PNG transparency in Win IE 5.5 & 6.

{

Var arVersion = navigator.appVersion.split ("MSIE")

Var version = parseFloat (arVersion [1])

If ((version > = 5.5) & & (document.body.filters))

{

For (var jung0; j

3. Use the picture tag IMG in html to use PNG pictures, and try to see whether the background of PNG pictures is transparent in IE6.

3. Add the following CSS code where the PNG image is used as the background in CSS:

Tags: Picture background file code method path content only copy tag web page learning practical deeper interest icon place practical practical easy to operate Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Linux MySQL Huawei macOS