加入收藏-方便您以后查找网页特效哦  
  你的位置:主页>>实用代码  
 

滚动字幕制作手册

 
   
     
  1.marquee基本参数

<marquee>滚动字幕</marquee>

效果如下:

滚动字幕

参数详解:
a) scrollAmount :它表示速度,值越大速度越快。如果没有它,默认为6,建议设为1~3比较好。
b)width和height:表示滚动区域的大小,width是宽度,height是高度。特别是在做垂直滚动的时候,一定要设height的值。
c) direction :表示滚动的方向,默认为从右向左:←←←。可选的值有right、down、up。滚动方向分别为:right表示→→→,up表示↑,down表示↓。
d)scrollDelay:这也是用来控制速度的,默认为90,值越大,速度越慢。通常scrollDelay是不需要设置的。
e)behavior:用它来控制属性,默认为循环滚动,可选的值有alternate(交替滚动)、slide(幻灯片效果,指的是滚动一次,然后停止滚动)
f)trueSpeed:平滑滚动。
g) align:是设定活动字幕的位置,不过除了居左、居中、居右三种位置外,又增加靠上(align=top)和靠下(align=bottom)两种位置。

h)Bgcolor:用于设定活动字幕的背景颜色,一般是十六进制数。
i)Loop:用于设定滚动的次数,当loop=-1表示一直滚动下去,直到页面更新。


<marquee trueSpeed scrollAmount=1 scrolldelay=50 width=300>滚动字幕</marquee>

效果如下:

滚动字幕

<marquee trueSpeed scrollAmount=1 scrolldelay=50 width=300 direction=right height=50 >滚动字幕</marquee>

效果如下:

滚动字幕

2.响应鼠标

<table width="120" height="47" border="1">
<tr>
<td align="left" valign="top"><marquee onmouseover=this.stop(); onmouseout=this.start(); direction="up" trueSpeed scrollAmount=1 scrolldelay=100>
<a href="http://www.toto369.com" target="_blank">IT精品网址</a>
</marquee></td>
</tr>
</table>

效果如下:

特效千寻

3.嵌套使用

1111111

代码如下:

<marquee height="100" direction="up" width="100" bgcolor="#ff9966">
<marquee height="100" direction="left" width="100%">
1111111
</marquee>
</marquee>

----------------------------
撞墙啦!

代码如下:

<marquee direction="down" behavior="alternate" scrollamount=1 height="60" width="468" bgcolor="#ff9966">
<marquee direction="right" behavior="alternate" scrollamount=4 width="468" bgcolor="#ff9966">
撞墙啦!
</marquee>
</marquee>










 

     
   
  COPYRIGHT © 2003-2005 ALL RIGHTS RESERVED  
业务联系广告服务 网站建设 关于我们 免责声明

月光宝盒工作室
800*600