Microsoft. alphaimageloader filter description

Source: Internet
Author: User
Microsoft. alphaimageloaderYes IE FilterIs used to transparently process images. Although Firefox and IE7 above IE browser has supported transparent PNG images, but in terms of IE5-IE6 still has a certain significance.

Syntax: Filter: progid: DXImageTransform. Microsoft. alphaimageloader (Enabled = Benabled , Sizingmethod = Ssize , Src = Surl )Attribute:
Enabled : Optional. Boolean ). Set or retrieve whether the filter is activated.True|False
True : Default Value. Filter activation.
False : The filter is disabled.
Sizingmethod : Optional. String ). Sets or retrieves the display mode of the image of the object to which the filter applies within the boundary of the object container.
Crop : Cut the image to fit the object size.
Image : Default Value. Increase or decrease the size boundary of an object to fit the image size.
Scale : Scale the image to adapt to the size boundary of the object.
SRC : Required. String ). Use absolute or relativeURLThe address specifies the background image. If you ignore this limit, the filter will not work.
Features:
Enabled : Read/write. Boolean ). ReadingEnabledAttribute.
Sizingmethod : Read/write. String ). ReadingSizingmethodAttribute.
SRC : Read/write. String ). ReadingSRCAttribute.
Note: An image is displayed between the background and content of the object within the boundary of the object container. You can also cut and change the size of the image. Assuming that the file is loaded in PNG (Portable Network Graphics) format, the transparency between 0% and 100% is also provided.
The transparency of images in PNG (Portable Network Graphics) format is best if you choose text. That is to say, you can select the content after the completely transparent area of the image in PNG (Portable Network Graphics) format.
Demo: # iddiv {position: absolute; left: 140px; Height: 400; width: 400; filter: progid: Scale ', sizingmethod = 'Scale ');}
. Dream {filter: progid: DXImageTransform. Microsoft. alphaimageloader (src = 'images/earglobe.gif ');} msdn: http://msdn2.microsoft.com/en-us/library/ms532969.aspx

P.s. If you want to use the backgroundimage attribute, You can implement this filter to avoid displaying the original image size, but similar to IMG width = 100% heigth = 100%.

Example:
Span. style. Filter = "progid: dximagetransform.microsoft.alphaimageloader(src='test.jpg ', sizingmethod = 'Scale ')";

Reference: Finally, let's talk about the effect reconciliation between FF and IE. This filter effect is only applicable to IE and cannot be displayed below ff. I think this is the final problem that the predecessor said he was very difficult to implement. In the past, we used * or _ to fix the difference between IE and ff. This time we were looking for a way to fix the problem that FF could not be implemented.
In fact, it is very easy to think. let FF display the image normally first, then use * or _ to clear the display effect under IE, and finally use * or _ to do the above filter effect. Success!

The above is an official description. In fact, in actual operations, you must note that the alphaimageloader filter will cause invalid links and buttons in the region. In general, the solution is to add links or buttons? : Position: relative to make it relatively floating. Note that when the parent layer of the area where the filter is loaded has a position: absolute position, position: relative cannot be used to restore the link. We recommend that you use the Floating Method.

Detailed operation:

  1. Add to the preview area (for example, preview in a div? Style: filter: progid: DXImageTransform. Microsoft. alphaimageloader (sizingmethod = scale );.
  2. Set the src attribute for alphaimageloader.

Microsoft. alphaimageloader filter description

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.