Annoying IE7, 8, Translucent filter (Filter:alpha) invalidation, PNG translucent invalidation solution

Source: Internet
Author: User
Tags image filter

The problem in the project, before using the ietest test ie7,8 found that the background transparency setting is invalid, and then find the article to solve! Read some information and make a summary.

Several IE translucent CSS styles

IE8 can write this-ms-filter: "Progid:DXImageTransform.Microsoft.Alpha (opacity=50)";

IE7 can write Filter:progid:DXImageTransform.Microsoft.Alpha (opacity=50) in this way;

Ie6,ie7,ie8 can write like this filter:alpha (opacity=50)

Progid:DXImageTransform.Microsoft This kind of writing is very difficult to understand, looks also annoying, general tendency filter:alpha (opacity=50) writing;

Look at the data said the first two ways, and Ms ActiveX technology is a road, the third looks like no ActiveX, but the nature is still ActiveX all the way; This allows you to disable all ActiveX tests in the security options, and all IE filters, including the filter, are not immediately valid;

There are two types of div background transparency

One is that the div itself and the inner element are all transparent, the other is div transparent, the child element is opaque

The first solution is to useBackground: rgba (255, 255, 255, 0.82); Set div style, child elements will not be transparent

In addition, the div is added to a parent Div, the parent div set relative, the original Div set absolute position with filter: Set Transparent, other sub-elements placed in the original Div sibling position, other elements also set Position:absolute, this is also a workaround

------------------------------

Read the author Iefans's translucent failure article, took off the

Reasons for PNG Translucent invalidation

IE7,IE8 are directly supporting the PNG image of the alpha, this time my IE8 in the PNG translucent failure reason, suspicion may be related to some 360Safe action, just suspicion.

Many situations will affect the PNG effect of IE8, this time better luck, found on the Internet method, changed the registry, solved the problem. Here we list several scenarios that could cause PNG registry options to be corrupted.

1. (Reason:. PNG does not have extended values or errors in the browser)

Start-run-regedit, open the registry, Hkey_local_machinesoftwaremicrosoftinternet explorerembedextntoclsidmappings see. png save does not exist. If the. png does not exist, click on the previous layer of the mouse, that is, embedextntoclsidmappings, then right-click the new item, enter. PNG, then point to. png, double-click the default value, and paste "clsid:0" in the value data. 2BF25D5-8C17-4B23-BC80-D3488ABDDC6B ".

This is my last successful method, this time not!

2. (Reason:. png file corruption in the system)

Run with start, enter "regsvr32 c:windowssystem32pngfilt.dll"

If you see "Loaded C:windowssystem32pngfilt.dll" while registering, the Dllregistersever input point is not found. Unable to register this file ", it indicates that this file may be damaged, you have to go to another machine to copy a good come over to cover. To register again.

3. (Reason: The QuickTime program of our great Apple Company interferes with the registration form)

Start-run->regedit, start the registry, locate Hkey_classes_rootmimedatabasecontent Type

The Chinese name and garbled characters will be deleted, such as [Video/mp4].

4. (Reason: Registry information Error!) This is my problem this time, after merging the registry, the following information will automatically overwrite the problematic information.

Save the following content as a. reg file, and then right-click Merge.

Windows Registry Editor Version 5.00

; PNG file association fix for Windows XP

; Created on May, Ramesh Srinivasan

[HKEY_CLASSES_ROOT. PNG]

"PerceivedType" = "image"

@= "Pngfile"

"Content Type" = "Image/png"

[HKEY_CLASSES_ROOT. Pngpersistenthandler]

@= "{098f2470-bae0-11cd-b579-08002b30bfeb}"

[Hkey_classes_rootpngfile]

@= "PNG Image"

"EditFlags" =dword:00010000

"Friendlytypename" =hex (2): 40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,

00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,

32,00,5C,00,73,00,68,00,69,00,6D,00,67,00,76,00,77,00,2E,00,64,00,6C,00,6C,

00,2c,00,2d,00,33,00,30,00,35,00,00,00

"Imageoptionflags" =dword:00000003

[Hkey_classes_rootpngfileclsid]

@= "{25336920-03f9-11cf-8fd0-00aa00686f13}"

[Hkey_classes_rootpngfiledefaulticon]

@= "Shimgvw.dll,2″

[Hkey_classes_rootpngfileshell]

@= "Open"

[Hkey_classes_rootpngfileshellopen]

"MuiVerb" = "@shimgvw. Dll,-550″

[Hkey_classes_rootpngfileshellopencommand]

@= "Rundll32.exe C:\windows\system32\shimgvw.dll,imageview_fullscreen%1″

[Hkey_classes_rootpngfileshellopendroptarget]

"Clsid" = "{e84fda7c-1d6a-45f6-b725-cb260c236066}"

[Hkey_classes_rootpngfileshellprintto]

[Hkey_classes_rootpngfileshellprinttocommand]

@= "Rundll32.exe c:\windows\system32\shimgvw.dll,imageview_printto/pt"%1 ""%2 ""%3 ""%4 ""

[Hkey_classes_rootsystemfileassociations.png]

"Imageoptionflags" =dword:00000003

[-hkey_current_usersoftwaremicrosoftwindowscurrentversionexplorerfileexts.png]

[-hkey_classes_rootmimedatabasecontent Typeimage/x-png]

[-hkey_classes_rootmimedatabasecontent Typeimage/png]

[Hkey_classes_rootmimedatabasecontent Typeimage/x-png]

"Extension" = ". png"

"Image Filter CLSID" = "{a3ccedf7-2de2-11d0-86f4-00a0c913f750}"

[Hkey_classes_rootmimedatabasecontent Typeimage/x-pngbits]

"0″=hex:08,00,00,00,ff,ff,ff,ff,ff,ff,ff,ff,89,50,4e,47,0d,0a,1a,0a

[Hkey_classes_rootmimedatabasecontent Typeimage/png]

"Extension" = ". png"

"Image Filter CLSID" = "{a3ccedf7-2de2-11d0-86f4-00a0c913f750}"

[Hkey_classes_rootmimedatabasecontent Typeimage/pngbits]

"0″=hex:08,00,00,00,ff,ff,ff,ff,ff,ff,ff,ff,89,50,4e,47,0d,0a,1a,0a

[hkey_classes_rootclsid{a3ccedf7-2de2-11d0-86f4-00a0c913f750}]

@= "Copngfilter Class"

[Hkey_classes_rootclsid{a3ccedf7-2de2-11d0-86f4-00a0c913f750}inprocserver32]

@= "C:\WINDOWS\system32\pngfilt.dll"

"ThreadingModel" = "Both"

[Hkey_classes_rootclsid{a3ccedf7-2de2-11d0-86f4-00a0c913f750}progid]

@= "Pngfilter.copngfilter.1″

[Hkey_classes_rootpngfilter.copngfilter]

@= "Copngfilter Class"

[Hkey_classes_rootpngfilter.copngfilterclsid]

@= "{a3ccedf7-2de2-11d0-86f4-00a0c913f750}"

[Hkey_classes_rootpngfilter.copngfilter.1]

@= "Copngfilter Class"

[Hkey_classes_rootpngfilter.copngfilter.1clsid]

@= "{a3ccedf7-2de2-11d0-86f4-00a0c913f750}"

When PNG encounters Filter:alpha

IE series of PNG problem is a widely criticized, long-standing, has not been a better solution to the problem, from the IE6 of the support to IE7/8 defect support, is somewhat progressive, but there are many not sound. For example, you can try when PNG encounters Filter:alpha, very strange phenomenon, PNG in IE7 black background.

This is a friend of the blue classics that explains the problem, "the background darken should be caused by the transparency of the entire form, so for IE7 (and possibly also for IE8) it provides support for translucent PNG, but this support is not sound. One manifestation of this unsound behavior is that when you set transparency for translucent PNG images (or elements that use translucent PNG as the background), the translucent portion of the PNG image appears black (but the opaque portion of the display is normal).

It is worth mentioning that IE achieves transparency through its proprietary CSS filters, rather than the standard CSS3 properties. And the IE transparent filter itself is the existence of a bug, of course, there is not much to say.

Annoying IE7, 8, Translucent filter (Filter:alpha) invalidation, PNG translucent invalidation solution

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.