How to solve IE6/7/8/9 parsing exceptions caused by transparent setting using filters _ javascript tips

Source: Internet
Author: User
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



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.