HBCMS更多的中文手册参考:

VALUES Attribute | values参数属性

DHTML中文手册

Sets or retrieves a list of semicolon-delimited RGB color values for a t:animatecolor element.

dhtml语法

HTML<t:ANIMATECOLOR VALUES = vValues... >
Scriptingt:ANIMATECOLOR.values(val) [ = vValues ]

DHTML可能的值

vValues Variant that specifies or receives a list of semicolon-delimited RGB color values. The values are applied over the course of the animation in the order they appear in the list.

The property is read/write. The property has no default value.

Remarks

The animation values must be legal values for the specified attributename property. in the context of t:animatecolor, valid attribute values are hexadecimal rgb values or the keywords that represent them (for example, #8a2be2 or blueviolet). for more information about supported color values, see the color table.

the values property overrides any specified to, from, or by values set on the animation.

the calcmode property determines how the values attribute is interpreted. depending on the calcmode setting, you can specify linear, discrete, paced, or splined interpolation between the values listed for the values attribute. these settings determine the rate of change from one value to another during the course of the animation梐 paced interpolation provides an even color change, for instance, whereas a splined interpolation might provide accelerated or decelerated transitions.

when writing script to dynamically change the properties of an active animation, developers should consider a couple of issues. because results might be unpredictable or undefined when you change the properties of an active animation, restart the animation with beginElement after you have made the change. For example:

<SCRIPT>
object.endElement();
object.values='cyan;#0000FF';
object.beginElement();
</SCRIPT>

For the animate, animatemotion, and animatecolor objects, the time2 behavior uses the following model to evaluate which properties to animate.

DHTML代码范例

This example demonstrates how you can set a semicolon-delimited series of values for the values attribute when using the t:ANIMATECOLOR element to animate color properties. The outer div element initially changes colors from blue (#0000ff) to cyan (#00ffff) over a five-second duration; the inner div reverses this animation over the same duration. click any button from the first group to set the first value for the t:animatecolor element's values attribute (the animation for the inner div element). click a button from the second group to set the second value in the series. the color value series you select for the inner div's animation will be played in reverse by the outer div element when you click the restart button.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<STYLE>
.time {behavior: url(#default#time2);}
</STYLE>
<?IMPORT namespace="t" implementation="#default#time2">
</HEAD>
<BODY>
<t:PAR id="p1" begin="0" dur="10" fill="hold">
<t:ANIMATECOLOR id="a1" targetElement="outerDIV"
attributeName="background-color" values="#0000FF;cyan" begin="0"
dur="5" fill="hold"/>
<t:ANIMATECOLOR id="a2" targetElement="innerDIV"
attributeName="background-color" values="cyan;#0000FF" begin="0"
dur="5" fill="hold"/>
</t:PAR>
<DIV id="outerDIV" class="time" style="FONT-SIZE: 18pt; LEFT: 68px;
WIDTH: 279px; POSITION: absolute; TOP: 260px; HEIGHT: 217px;
BACKGROUND-COLOR: #0000FF; TEXT-ALIGN: left; padding-left:3;
border:1px solid black">outerDIV</DIV>
<DIV id="innerDIV" class="time" style="FONT-SIZE: 18pt; LEFT: 112px;
WIDTH: 188px; POSITION: absolute; TOP: 318px; HEIGHT: 98px;
BACKGROUND-COLOR: cyan; TEXT-ALIGN: left;padding-left:3">innerDIV</DIV>
</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.

applies to

t:ANIMATECOLOR

更多语法参考

introduction to html+time, Color Table