HBCMS更多的中文手册参考:

ACCUMULATE Attribute | accumulate参数属性

DHTML中文手册

Sets or retrieves a value that indicates whether the animation is cumulative.

dhtml语法

HTML<ELEMENT ACCUMULATE = sType... >
Scriptingobject.accumulate(val) [ = sType ]

DHTML可能的值

sTypeString that specifies or receives one of the following values:
noneDefault. Repeat iterations are not cumulative.
sumEach repeat iteration after the first one builds upon the last value of the previous iteration.

The property is read/write. The property has a default value of none.

Remarks

This property is ignored if the target attribute value does not support addition, or if the repeatcount value is one. also, cumulative animation is not defined for animation specified using the to attribute.

DHTML代码范例

This example demonstrates the two uses of the accumulate property; none and sum.

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>accumulate Property</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
<SCRIPT>
function beginNone(){
count.innerText="1";
t1.accumulate="none";
accumulate1.innerText="none";
t1.beginElement();
l.innerText = "";
h.innerText = "";
}
function beginSum(){
count.innerText="1";
t1.accumulate="sum";
accumulate1.innerText="sum";
t1.beginElement();
l.innerText = "";
h.innerText = "";
}
function displayDimension(){
if(t1.accumulate == 'sum'){
l.style.left = "305px";
h.style.left = "610px";
l.innerText = "450px";
h.innerText = "100px";
}else{
l.style.left = "135px";
h.style.left = "310px";
l.innerText = "150px";
h.innerText = "100px";
}
}
</SCRIPT>
</HEAD>
<BODY>
<SPAN id="l" style="position:absolute;top:100px;"></SPAN>
<SPAN id="h" style="position:absolute;top:165px;"></SPAN>
<t:ANIMATE id="t1" targetElement="div1" attributeName="width" by="150px"
dur="3" repeatCount="3" begin="indefinite" onend="displayDimension();"
onrepeat="count.innerText=t1.currTimeState.repeatCount+1" fill="freeze" />
<DIV id="div1"
style="position:absolute;top:125px;left:25px;height:100px;width:125px;
background-color:yellow;text-align:center;font-size:large;
border:solid black 2px;">Expanding DIV
</DIV>
<SPAN style="position:absolute;top:245px;"><B>Accumulate:</B></SPAN>
<SPAN id="accumulate1" style="position:absolute;top:245px;left:130px;"></SPAN>
<SPAN style="position:absolute;top:265px;">Current Iteration:</SPAN>
<SPAN id="count" style="position:absolute;top:265px;left:150px;">1</SPAN>
<P style="position:absolute;top:300px;left:25px;">
<BUTTON onclick="beginNone()"><B>Accumulate</B> = NONE</BUTTON>
<BUTTON onclick="beginSum()"><B>Accumulate</B> = SUM</BUTTON>
</P>
</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.

是否符合公共标准

This property is defined in Synchronized Multimedia Integration Language (SMIL) 2.0 Non-Microsoft link.

Applies To

t:TRANSITIONFILTER, t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION

更多语法参考

Introduction to HTML+TIME