Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report