使颜色不断变换的特效
请注意看字体颜色效果: 你好
代码:
<FONT id=font1 style="FONT-SIZE: 60pt" face=华文新魏 color=#00FFFF>你好</FONT>
<?import namespace = t urn = "urn:schemas-microsoft-com:time" implementation = "#default#time2" declareNamespace />
<t:animateColor attributeName = "color" targetElement = "font1" values = "#00FF00;;#FFFF00;;#FF00FF;;#0000FF;" autoReverse = "true" dur = "12" repeatCount = "100">
</t:animateColor>
说明:
<?import namespace = t urn = "urn:schemas-microsoft-com:time" implementation = "#default#time2" declareNamespace />
指定以下显示的语言.
t:animateColor
颜色的变化标签.
attributeName = "color"
确定要变化的属性,这里是文字颜色,可以指定边框颜色属性或背景颜色属性等.
targetElement = "font1"
确定要变化的目标,这里就指向文字标签里的id=font1,注意:这两个值font1必须一致,但随便写什么都可以,是个记号而已.再注意:一个叶面里有多个变化时,这个记号必须不一样,不然都不能显示变化了.
values = "#00FF00;;#FFFF00;;#FF00FF;;#0000FF;"
变化的颜色,随便填几个,每个间用分号;隔开.变化顺序从左到右,再从右到左渐变.
autoReverse = "true"
变化方式循环,false不循环.
dur = "12"
变化一次的时间(秒)
repeatCount = "100" 变化次数.
背景颜色变化:
代码:
<table id=gaoss33 width="250" height="120" border="8" cellspacing="10" cellpadding="10" align="center" valign="middle" bgcolor="#55632F" bordercolor=#6b8e23><tr><td></td></tr></table>
<?import namespace = t urn = "urn:schemas-microsoft-com:time" implementation = "#default#time2" declareNamespace />
<t:animateColor attributeName = "bgcolor" targetElement = "gaoss33" values = "#00FF00;;#FFFF00;;#FF00FF;;#0000FF;" autoReverse = "true" dur = "6" repeatCount = "100">
</t:animateColor>
代码:
<table id=gao width="250" height="120" border="8" cellspacing="10" cellpadding="10" align="center" valign="middle" bgcolor="#55632F" bordercolor=#6b8e23><tr><td></td></tr></table>
<?import namespace = t urn = "urn:schemas-microsoft-com:time" implementation = "#default#time2" declareNamespace />
<t:animateColor attributeName = "bordercolor" targetElement = "gao" values = "#00FF00;;#FFFF00;;#FF00FF;;#0000FF;" autoReverse = "true" dur = "3" repeatCount = "100">
</t:animateColor>