HBCMS更多的中文手册参考:

Compositor Filter

DHTML文档教程

Displays new content of the object as a logical color combination of the new and original content. The color and alpha values of each version of the content are evaluated to determine the final color on the output image.

dhtml语法

HTML
<ELEMENT STYLE=
"filter:progid:DXImageTransform.Microsoft.Compositor(sProperties)"
... >
Internet Explorer 5.5 or later
Scripting
object.style.filter =
"progid:dximagetransform.microsoft.compositor(sproperties)"
Internet Explorer 5.5 or later

DHTML可能的值

sPropertiesString that specifies one or more properties exposed by the filter.

Members Table

AttributePropertyDescription
functionFunction Sets or retrieves the compositing operation to perform.
MethodDescription
apply Captures the initial display of an object's content for a transition.
play Plays the transition.

Remarks

This filter exposes a rich set of image composition functions that interact with the colors and transparency of the content of the input object. To create a static filter with a transition, follow these steps.

  1. Choose a function.

    Review the function property for a description of the available composition functions. set this property in the compositor filter declaration for the object.

  2. create input a.

    determine the content that the filtered object will initially display. the composition functions consider this as input a.

  3. use the apply method of the compositor filter.

    this defines the content as input a at the time you call the apply method.

  4. create input b.

    change properties of the object—visibility, innertext, backgroundcolor, or border—or the properties of its child elements. the composition functions consider the content, after all changes, as input b.

  5. use the play method of the compositor filter.

    the displayed image updates to the output of the composite function.

the object that the filter is applied to must have layout before the filter effect displays. you can give the object layout by setting the height or width property, setting the position property to absolute, setting the writingmode property to tb-rl, or setting the contenteditable property to true.

you can assign multiple filters or transitions to an object by declaring each in the filter property of the object. the following div declaration assigns two filters and a Wheel transition to a div element.

<DIV STYLE="width:100%; filter:
progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310)
progid:DXImageTransform.Microsoft.Blur(pixelradius=2)
progid:DXImageTransform.Microsoft.Wheel(duration=3);">
Blurry text with smudge of gray.</div>     
When multiple filters are applied to an object, each filter is processed in source order, with the exception of procedural surfaces, which are computed first. To emphasize a filter's effect, place it last in source order or on the object's parent. Always place transitions last in source order.

DHTML代码范例

This example uses a select element to modify the Function property that is used for the filter.

<B>Compositor Function:</B>
<BR>
<SELECT ID=funcsel onchange="D1.filters.item(
'DXImageTransform.Microsoft.Compositor').Function =
this.options(selectedIndex).value;">
<OPTION value=0>0: Clear both sets of input.</OPTION>
<OPTION value=1>1: Show the minimum color from both sets of input.</OPTION>
<OPTION value=2>2: Show the maximum color from both sets of input.</OPTION>
<OPTION value=3>3: Show Input A only.</OPTION>
<OPTION value=4>4: Show Input A over Input B.</OPTION>
<OPTION value=5>5: Only show Input A inside the Input B render area.</OPTION>
<OPTION value=6>6: Only show Input A outside the Input B render area.</OPTION>
<OPTION value=7>7: Only show Input A and B inside Input B render area.</OPTION>
<OPTION value=8>8: Show Input A minus Input B.</OPTION>
<OPTION value=9>9: Show Input A plus Input B.</OPTION>
<OPTION value=10>10: Show Input A and clear wherever the input intersects.</OPTION>
<OPTION value=19>19: Show Input B only.</OPTION>
<OPTION value=20 selected>20: Show Input B over Input A.</OPTION>
<OPTION value=21>21: Only show Input B inside the Input A render area.</OPTION>
<OPTION value=22>22: Only show Input B outside the Input A render area.</OPTION>
<OPTION value=23>23: Only show Input A and B inside the Input A render area.</OPTION>
<OPTION value=24>24: Show Input B minus Input A.</OPTION>
<OPTION value=25>25: Show Input B plus Input A.</OPTION>
</SELECT>
This feature requires Microsoft® Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

applies to

A, ACRONYM, ADDRESS, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, FRAME, hn, IFRAME, FRAMESET, I, INS, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI, MARQUEE, MENU, NOBR, OL, OBJECT, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TEXTAREA, TH, TD, TT, U, UL, VAR, XMP

更多语法参考

scripting filters, Filter Design Considerations