| Availability: |
| |||
| 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 Enabled property provides a consistent means of controlling whether the filter is active or not. It can accept a value of true or false.
The Color property defines the color value selected for the mask.
The example shows how a transparent GIF file can be used to cut out a shape with this filter.
<HTML> <HEAD> </HEAD> <BODY> Normal--> <IMG ID="NORMAL" SRC="./Logo150.gif"> Filtered--> <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 |
| Prev | Home | Next |
| filter - Mask() | Up | filter - Matrix() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. | ||