In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
What is the method of JS to achieve the transparency of PNG pictures under IE6? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
And you focus on the use of Javascript to achieve IE6 PNG picture transparency of the new method! I saw an implementation in Javascript on Webappers today, which is much more effective than what I know so far.
A new method to realize the transparency of PNG pictures under IE6 with Javascript!
There are many ways to achieve the transparency of PNG images under IE6. Today, I saw a practice using Javascript on Webappers, which is much more effective than what I know so far. For details, please see the demo page of UnitPNGFix.
Its implementation principle is very simple, if you use a PNG picture as a background under IE6, then use the IE filter effect to do, which we all know, do not say much. But UnitPNGFix can achieve the corresponding effect according to the background "repeat" attribute you set, which is awesome! If the PNG image is directly used in the interface, that is, embedded in the interface in the form of "img" title, then UnitPNGFix will replace this PNG picture with a transparent GIF picture, IE6 should support GIF transparency, so you will see a blank transparent picture. You may be able to guess what happened next. UnitPNGFix will set the background of the newly generated transparent GIF image to the original PNG picture, and filter the background image with IE filter, thus realizing the transparent effect of PNG image under IE6 visually.
The UnitPNGFix file is small, including an uncompressed Javascript file and a transparent gif image, which adds up to only 980 bytes. It is also easy to use, as long as you set the address of the transparent gif image in its Javascript file, it can be used in your web page.
UnitPNGFix boasts the following characteristics:
The file size is small, less than 1kb!
Solved some problems with IE filter properties
Can be applied to img objects and background properties
Electronically, there is no need to define classes or functions
The height and width of an electronic setting element
This is the answer to the question about how JS realizes the transparency of PNG pictures under IE6. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
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: 211
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.