direction Attribute | Direction参数属性
| DHTML文档教程 |
Sets or retrieves the direction that the filter's effect is offset.
dhtml语法
HTML | { filter:progid:dximagetransform.microsoft. filter-name( direction = ioffset ... ) ... } |
---|
scripting | object. filters. item( "dximagetransform.microsoft. filter-name"). direction [ = ioffset ] |
---|
dhtml可能的值
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.
DHTML代码范例
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