FILL Attribute | fill参数属性 | DHTML中文手册 |
Sets or retrieves the action an element takes if its timeline ends before the timeline on its parent element ends.
The
dhtml语法
HTML <ELEMENT FILL = sAction... > Scripting object.fill(f) [ = sAction ]
DHTML可能的值
sAction String that specifies or receives one of the following values.
freeze Element will remain in its state at the end of its timeline. The effective end of the element is dependent on the parent time container type. In a t:par container, the element ends when the t:par ends. in a t:seq or an t:excl container, the element ends when the next element begins. hold element will remain in its state at the end of its timeline until the end of the parent time container, regardless of the parent time container type. remove element will not extend past the end of its timeline. transition internet explorer 6 and later. element will remain in its state at the end of its timeline. the effective end of the element is dependent upon the subsequent transition of an overlapping element. the element ends when the overlapping element's transition ends. an element with a value of transition will only work appropriately when the following conditions are met:
- The element is inside of a t:SEQ or t:PAR element.
- The t:transitionfilter is a child of the element to be transitioned.
- the parent element of the t:transitionfilter must have a timecontainer attribute value of par.
- t:autoreverse is not used on the t:transitionfilter element.
- the elements overlap in layout. it is currently possible for the elements not to overlap and a value of transition to have an effect. However, this should not be done because later versions of Internet Explorer may not support this behavior.
The property is read/write. The property has no default value.
Remarks
If an element is a time container (t:SEQ, for example), then the default value is remove.
If an element is not a time container and specifies a dur, end, repeatdur, or repeatcount, then the default value is remove.
if an element is not a time container and does not specify any of the above four attributes, then the default value is freeze.
this property supersedes the endhold property.
Examples
This example uses the fill attribute to set the action taken by the element when its timeline ends before the timeline of its parent element ends.
<HTML XMLNS:t ="urn:schemas-microsoft-com:time"> <HEAD> <TITLE>fill Property</TITLE> <?IMPORT namespace="t" implementation="#default#time2"> <STYLE> .time{ behavior: url(#default#time2);} </STYLE> </HEAD> <BODY> <t:excl id="t1" begin="0" DUR="15"> <DIV ID="div1" class="time" BEGIN="0" DUR="10" fill="freeze"> This text has a duration of 10 seconds, but the time container has a duration of 15 seconds. This text will be displayed beyond its timeline until the timeline of its parent element ends. </DIV> </t:excl> </BODY> </HTML>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.The example below demonstrates setting the FILL attribute to transition. Because the first and second images have the FILL attribute set to transition, the first image will be visible while the second image transitions in and the second image will be visible as the third image transitions in.
<HTML XMLNS:t = "urn:schemas-microsoft-com:time"> <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> <?import namespace = t urn = "urn:schemas-microsoft-com:time" implementation = "#default#time2" /> </HEAD> <BODY> <DIV STYLE="height:100px"> <t:SEQ REPEATCOUNT="indefinite" > <t:MEDIA STYLE="position:absolute;" src = "onepic.jpg" DUR="3" TIMECONTAINER="par" FILL="transition" > <t:TRANSITIONFILTER TYPE="fade" DUR="2"/> </t:MEDIA> <t:MEDIA STYLE="position:absolute;" SRC = "twopic.jpg" DUR="3" TIMECONTAINER="par" FILL="transition" > <t:TRANSITIONFILTER TYPE="ClockWipe" DUR="2"/> </t:MEDIA> <t:MEDIA STYLE="position:absolute;" SRC = "threepic.jpg" DUR="3" TIMECONTAINER="par" > <t:TRANSITIONFILTER TYPE="barnDoorWipe" DUR="2"/> </t:MEDIA> </t:SEQ> </DIV> </BODY> </HTML>
是否符合公共标准
This property is defined in Synchronized Multimedia Integration Language (SMIL) 2.0 .
Applies To
t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:SET, time2, t:VIDEO
更多语法参考
Introduction to HTML+TIME