How to solve IE6789 parsing exceptions caused by transparent Settings Using filters. For more information, see. As follows:
The Code is as follows:
Use the IE developer tool or the developer tool that comes with IE8. The structure is as follows:
The Inline style width, height, and background added to p are arranged in sequence. Normal!
But after adding filter: alpha (opacity = 20) to p,
The Code is as follows:
The situation has changed, for example:
As you can see in the Red Circle, width and filter are crowded on a row. Normally, the width should start with another line.
Some people may say that this is only because the developer tool is not correctly displayed, as long as it does not affect the correct rendering of page elements.
Indeed, in IE6/7/8/9, the width, height, background color, and transparency of the element can all be rendered as expected.
In addition, writing styles in style labels or css files also produces the above phenomenon.
Let's take a look at setting filter in JS. The situation is slightly different. The Code is as follows:
The Code is as follows:
Set filter in JS in IE 6/7/8/9