filter - MaskFilter() (Filter/visual)

Uses the transparent color pixels of an object into a mask.

Availability:

JScript - 5.5
Internet Explorer - 5.5
Object properties:Enabled , Color
Supported by objects:A, ACRONYM, ADDRESS, B, BDO, BIG BLOCKQUOTE, body, BUTTON, CAPTION, CENTER, CITE, CODE, custom, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, FRAME, Hn, I, IFRAME, IMG, INPUT, INS, KBD, LABEL, LEGEND, LI, MARQUEE, MENU, NOBR, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TD, TEXTAREA, TH, TT, U, UL, VAR, XMP

This filter behaves differently according to whether a pixel in the HTML Element object being filtered is transparent or not.

Transparent pixels are added to the mask image. Non transparent pixels are set to be transparent in the mask image.

The following properties are available to control this filter:

The example shows how a transparent GIF file can be used to cut out a shape with this filter.

Example code:

   <HTML>
   <HEAD>
   </HEAD>
   <BODY>
   Normal--&gt;
   <IMG ID="NORMAL" SRC="./Logo150.gif">
   Filtered--&gt;
   <IMG ID="MYIMAGE" SRC="./Logo150.gif">
   <BR>
   <SCRIPT>
   myFilter = "progid:DXImageTransform.Microsoft.MaskFilter(color=lightgreen, strength=20)";
   document.all.MYIMAGE.style.filter = myFilter;
   </SCRIPT>
   </BODY>
   </HTML>

See also:color value, filter - Mask(), Filter object, style.filter

PropertyJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
Enabled n/a5.5 5.5 n/a5.5 5.5 n/a n/a n/a n/a n/a n/a-
Color n/a5.5 5.5 n/a5.5 5.5 n/a n/a n/a n/a n/a n/a-