DIRECTION Attribute | direction Property

MS Office DHTML, HTML & CSS

DIRECTION Attribute | direction Property


Sets or retrieves the directional offset of the filter, expressed in 45-degree increments, clockwise from the vertical orientation of the object.

Syntax

HTML { filter:filterName (DIRECTION = iOffset ...) }
Scripting object.filters.filterName.direction [ = iOffset ]

Possible Values

iOffset Integer that specifies one of the following values, in degrees:
0Top
45Top right
90Bottom
135Bottom right
180Bottom
225Bottom left
270 Left
315Top left

The property is read/write with a default value of 270.

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 a blur filter, with an initial strength of 1, on an image. 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="joker2.jpg" onfilterchange="HandleChange()"
   STYLE="filter:blur (STRENGTH=1 DIRECTION=0)" />
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
blur, shadow

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.