marquee设置滚动效果
marquee基本语法
<marquee
align=left|center|right|top|bottom
bgcolor=#n
direction=left|right|up|down
behavior=type
height=n
hspace=n
scrollamount=n
Scrolldelay=n
width=n
VSpace=n
loop=n>
标签属性
direction 文字的滚动方向,可以取值分别为up,down,left,right,分别表示向上向下向左向右滚动
behavior 设置文字的滚动方式,可以取值为scroll,slide,alternate.分别是循环滚动,只滚动一次,来回交替滚动.默认为scroll
loop 循环设置(一般可以不用)
scrollamount 滚动速度
scrolldelay 滚动延迟(单位ms)
bgcolor 滚动文字的背景设置
hspace、vspace 表示元素到区域边界的水平距离和垂直距离,值是正整数,单位是像素。
height、width 表示运动区域的高度和宽度,值是正整数(单位是像素)或百分数,默认width=100% height为标签内元素的高度
其它:
<marquee direction="向什么方向移动" height="移动区域高度" width="移动区域宽度" scrollamount="移动速度" onmouseover=this.stop() onmouseout=this.start()>"
速度:scrollamount=n(n,变量)
延时:scrolldelay==n(n,变量)
onmouseover 设置鼠标放在移动区域的时候暂停移动
onmouseout 鼠标离开的时候继续滚动