Freigeben über


strength Attribute | Strength Property

Sets or retrieves the distance, in pixels, that a filter effect extends.

Syntax

HTML
{ filter:progid:DXImageTransform.Microsoft.filter-name(
    strength = iDistance ... ) ... }
Scripting
object.filters.item(
    "DXImageTransform.Microsoft.filter-name").Strength [ = iDistance ]

Possible Values

iDistance Integer that specifies or receives the distance, in pixels, that an effect extends.
5
Default.

The property is read/write. The property has a default value of 5 for all objects with the following exceptions:

Wave 1
Shadow 1

Remarks

The following table defines the limitations on the range of iDistance depending on the filter used.

Filter Allowable Range
MotionBlur zero or greater
Glow one to 255
Shadow one to 255
Wave one or greater

Example

This example sets the Strength and Direction properties of the MotionBlur filter to an initial strength of 1. When the page loads, the Strength and Direction properties cause the onfilterchange event to fire repeatedly until the strength reaches 200.

<SCRIPT>
function HandleChange()
{
   with (window.event.srcElement.filters[0])
   {
      if (strength < 200)
      {
         strength += 1;
         direction += 45;
      }
   }
}</SCRIPT>
<IMG ID="img1" SRC="solarsys.gif" onfilterchange="HandleChange()"
   STYLE="filter:progid:DXImageTransform.Microsoft.motionBlur(STRENGTH=1, DIRECTION=0)" />

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/filter/strength.htm

Applies To

MotionBlur, Glow, Wave, Shadow