HTML+TIME学习笔记(六)
<P class=ft style="MARGIN: auto 0cm; TEXT-ALIGN: center" align=center><FONT size=3><FONT color=#000000><FONT face=宋体><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">第六课</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></FONT></FONT></P><P class=ft style="MARGIN: auto 0cm"><FONT size=3><FONT color=#000000><SPAN lang=EN-US style="FONT-FAMILY: Arial"> </SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>上节讲了渐变,我们也已经讲了</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">5</SPAN><FONT face=宋体><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">个课时啦,大家应该有所收获吧?这样对我也算是一种激励和安慰。现在我差不多花了一个礼拜的业余时间都来编写这个学习笔记。今天就再讲一个动画效果——闪烁字体,想想怎么用代码编写呢?</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT></P>
<P class=ft style="MARGIN: auto 0cm"><FONT size=3><FONT color=#000000><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体> 可能绝大部分人都会用</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">JS</SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>脚本编写这个效果,不过没</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">TIME</SPAN><FONT face=宋体><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">写的简单。</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT></P>
<P class=ft style="MARGIN: auto 0cm"><FONT size=3><FONT color=#000000><SPAN lang=EN-US style="FONT-FAMILY: Arial"></SPAN><FONT face=宋体><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">先来看看例子</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT></P>
<P class=ft style="MARGIN: auto 0cm"><FONT face=宋体><FONT size=5><FONT color=blue><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><A href="http://roger01rao.ik8.com/htmlntime/jiaocheng/教程6.html"><FONT face=宋体><FONT size=5><FONT color=blue><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">点击看效果</SPAN></FONT></FONT></FONT></A></SPAN></FONT></FONT></FONT></P>
<P class=ft style="MARGIN: auto 0cm"><FONT size=3><FONT color=#000000><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>接下来看代码</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">:<o:p></o:p></SPAN></FONT></FONT></P>
<P class=style8 style="MARGIN: auto 0cm"><SPAN lang=EN-US style="FONT-FAMILY: Arial"><FONT size=3><FONT color=#000000><BODY BGCOLOR="#000000" TEXT="#ff0000"> <o:p></o:p></FONT></FONT></SPAN></P>
<P class=style8 style="MARGIN: auto 0cm"><SPAN lang=EN-US style="FONT-FAMILY: Arial"><FONT size=3><FONT color=#000000><CENTER><o:p></o:p></FONT></FONT></SPAN></P>
<P class=style8 style="MARGIN: auto 0cm"><SPAN lang=EN-US style="FONT-FAMILY: Arial"><FONT size=3><FONT color=#000000><SPAN ID="blink" STYLE="color: #FFFFFF; behavior: url(#default#time2)" begin="0;blink.end+0.1" dur="0.1" timeaction="style"><o:p></o:p></FONT></FONT></SPAN></P>
<P class=style8 style="MARGIN: auto 0cm"><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p><FONT color=#000000 size=3> </FONT></o:p></SPAN><FONT size=3><FONT color=#000000><SPAN lang=EN-US style="FONT-FAMILY: Arial"><font face=</SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>华文琥珀</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"> size=14><br><br><br></SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>欢迎光临“黄莺语柳</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"></SPAN></SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>紫燕归梁”的空间!</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><br></SPAN><FONT face=宋体><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">希望大家不吝赐教,以便进一步提高。</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT></P>
<P class=style8 style="MARGIN: auto 0cm"><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p><FONT face=宋体 color=#000000 size=3></FONT></o:p></SPAN></P>
<P class=style8 style="MARGIN: auto 0cm"><SPAN lang=EN-US style="FONT-FAMILY: Arial"><FONT size=3><FONT color=#000000></font><o:p></o:p></FONT></FONT></SPAN></P>
<P class=style8 style="MARGIN: auto 0cm"><SPAN lang=EN-US style="FONT-FAMILY: Arial"><FONT size=3><FONT color=#000000></SPAN><o:p></o:p></FONT></FONT></SPAN></P>
<P class=style8 style="MARGIN: auto 0cm"><SPAN lang=EN-US style="FONT-FAMILY: Arial"><FONT size=3><FONT color=#000000></CENTER> <o:p></o:p></FONT></FONT></SPAN></P>
<P class=ft style="MARGIN: auto 0cm"><FONT size=3><FONT color=#000000><SPAN lang=EN-US style="FONT-FAMILY: Arial"> </SPAN><FONT face=宋体><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">效果描述:就是让所写的文字动态闪烁显示</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT></P>
<P class=ft style="MARGIN: auto 0cm"><FONT size=3><FONT color=#000000><SPAN lang=EN-US style="FONT-FAMILY: Arial"> </SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>这里有两</FONT></SPAN><FONT face=宋体><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">个地方需要注意,首先,如果我只放这段代码:</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT></P>
<P class=style8 style="MARGIN: auto 0cm"><FONT size=3><FONT color=#000000><SPAN lang=EN-US style="FONT-FAMILY: Arial"><SPAN ID="blink" STYLE="color: #FFFFFF; behavior: url(#default#time2)" begin="0;blink.end+0.1" dur="0.1" timeaction="style"><font face=</SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>华文琥珀</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"> size=14><br><br><br></SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>欢迎光临“黄莺语柳</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"></SPAN></SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>紫燕归梁”的空间!</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><br></SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>希望大家不吝赐教,以便进一步提高。</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"></font></SPAN><o:p></o:p></SPAN></FONT></FONT></P>
<P class=ft style="MARGIN: auto 0cm"><FONT size=3><FONT color=#000000><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>字体就会是黑色,背景是白色,也就到没有色彩的闪烁,为了给出一个好的效果,我这里设置了</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><BODY BGCOLOR="#000000" TEXT="#ff0000"></SPAN><FONT face=宋体><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">,这样就可以产生红白效果的闪烁啦。</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT></P>
<P class=ft style="MARGIN: auto 0cm 12pt"><FONT size=3><FONT color=#000000><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>其次,这个闪烁是怎么来的呢?</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">begin="0;blink.end+0.1" </SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>巧妙的利用了上一次结束时间延时</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">0.1</SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>秒来开始下一次的</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">begin</SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>,所以能够反复闪烁而不只是一次。</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">TIMEACTION</SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>是专门让这个时间控制针对某一个属性起作用,比方说</FONT></SPAN></FONT></FONT><FONT size=3><FONT color=#000000><SPAN lang=EN-US style="FONT-FAMILY: Arial">CLASS="time" BEGIN="0" DUR="11" TIMEACTION="style" STYLE="Color:Red;"</SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>这样的一句,就是针对</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">“</SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>红色文字</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">”</SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>这个属性起作用,应用</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial">time</SPAN><FONT face=宋体><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">行为的这个对象在时间结束时并不删除掉,而只是改变它的颜色。</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT></P>
<P class=ft style="MARGIN: auto 0cm"><FONT size=3><FONT color=#000000><SPAN lang=EN-US style="FONT-FAMILY: Arial"> </SPAN><SPAN style="mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial"><FONT face=宋体>这样大家就可以根据自己的需要来编写这个动画效果了,是不是很简单啊?那还不赶快行动!好好编写编写吧!</FONT></SPAN></FONT></FONT><SPAN lang=EN-US style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></P> 先来顶哈 再来收藏了 怎么显示的效果呢!!!你在那存的啊!!老师!!我是初学着!! <BODY BGCOLOR=\"#000000\" TEXT=\"#ff0000\">
<CENTER>
<SPAN ID=\"blink\" STYLE=\"color: #FFFFFF; behavior: url(#default#time2)\" begin=\"0;blink.end+0.1\" dur=\"0.1\" timeaction=\"style\">
<font face=华文琥珀 size=14><br><br><br>欢迎“ヤ;聆聽浪漫”帅哥的到来!<br>希望大家不吝赐教,以便进一步提高。
</font>
</SPAN>
</CENTER>
[ 本帖最后由 ヤ;聆聽浪漫 于 2008-8-8 18:02 编辑 ] 这样还是蛮好玩的!!!!! 希望能学到更多 !! 来学习了,谢谢。 继续留下脚印慢慢学习。。
[ 本帖最后由 文子 于 2008-8-8 22:49 编辑 ] 继续跟着学习。
页:
[1]
2