Defining Visual Filters

Defining Visual Filters


Visual filters modify the appearance of a control. In fact, they can totally take over the visual output of a control when applying their effect. A good example of a visual filter is the alpha filter. It blends its target into the background. The author controls the amount of blend (or opacity). Opacity is expressed as a percentage. For example, the following HTML causes the image to be 20 percent opaque:

<img id=sample src=sample.jpg style="filter:alpha(opacity=20)">


Internet Explorer 4.0 supports a range of visual filters, shown in the following table, from the aforementioned alpha blend to a light filter that simulates colored lights shining on the control.
Filter effect Description
Alpha Sets a transparency level.
Blur Creates the impression of moving at high speed.
Chroma Makes a specific color transparent.
Drop Shadow Creates an offset solid silhouette.
FlipH Creates a horizontal mirror image.
FlipV Creates a vertical mirror image.
Glow Adds radiance around the outside edges of the object.
Grayscale Drops color information from the image.
Invert Reverses the hue, saturation, and brightness values.
Light Projects light sources onto an object.
Mask Creates a transparent mask from an object.
Shadow Creates a solid silhouette of the object.
Wave Creates a sine wave distortion along the x-axis and y-axis.
XRay Shows just the edges of the object.

To experiment with filters use the following samples provided with the Internet Client SDK. Filters Wizard
Wave Filter Wizard

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.