Sets or retrieves the direction that the filter's effect is offset.
Syntax
HTML | { filter:progid:DXImageTransform.Microsoft. filter-name( direction = iOffset ... ) ... } |
---|
Scripting | object. filters. item( "DXImageTransform.Microsoft. filter-name"). Direction [ = iOffset ] |
---|
Possible Values
iOffset | Integer that
specifies or receives the direction of the offset, in degrees. This can be one of the following values.0 | Top | 45 | Top right | 90 | Right | 135 | Bottom right | 180 | Bottom | 225 | Bottom left | 270 | Default. Left | 315 | Top left |
|
The property is read/write.
The property has a default value of
270
for all objects with the
exception of
Shadow which has a default value of 225.
Remarks
Values less than 0 or greater than 360 automatically convert to values between 0 and 360. For example, a value of -45 degrees is equivalent to a value of 315 degrees.
Example
This example sets the Direction and Strength properties of the MotionBlur filter for an image, with an initial strength of 1. When the page loads, the onfilterchange event of the image fires. The onfilterchange event fires each time the Strength and Direction properties change, until Strength reaches a value of 100.
<SCRIPT>
function HandleChange()
{
with (window.event.srcElement.filters[0])
{
if (strength < 100)
{
strength += 1;
direction += 45;
}
}
}</SCRIPT>
<IMG ID="img1" SRC="solarsys.gif" onfilterchange="HandleChange()"
STYLE="filter:progid:DXImageTransform.Microsoft.MotionBlur(
STRENGTH=1, DIRECTION=0)" />
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
Applies To