<marquee>标签
1.页面自动滚动效果,使用<marquee>标签可以移动文字,表格,图片等。
移动文字:
<marquee><p>文字</p> | <img src='图片路径'/> | <table>表格</table></marquee>
2.behavior属:设定滚动方式,
值有:alternate:来回滚动,scroll: 一端滚动到另一端。slide: 只滚动一次。
<marquee behavior="alternate">来回滚动</marquee>
3.bgcolor属性:字幕背景颜色。
<marquee bgcolor="#223344">背景颜色</marquee>
4.direction属性:滚动方向。
值:down:向下,top:向上,left:向左,right:向右。
<marquee behavior="left">字幕滚动方向自右向左滚动</marquee>
5.height属性:字幕滚动区域的高,width属性:字幕滚动区域的宽。
<marquee height="100px" width="200px">滚动字幕的宽高分别为200px,100px</marquee>
6.hspace属性:设置滚动字幕区域相对于父类的水平距离。
<div style="height:500px,wigth:800px"> <marquee hspace="50px">距离DIV的水平距离为50px</marquee> </div>
7.vspace属性:设置滚动字幕区域相对于父类的垂直距离。
<div style="height:500px,wigth:800px"> <marquee hspace="30px">距离DIV的垂直距离为30px</marquee> </div>
8.loop属性:设置字幕滚动次数。
值:-1:无线循环,可为数值,默认为-1.
9.scrollamount属性:设置字幕滚动速度。
值为数字,单位px.
<marquee scrollamount="10" >滚动速度为10px/s </marquee>
10.scrolldelay属性:设置字幕滚动的延迟时间,
值为数值,单位毫秒,最小值为60毫秒。
<marquee scrolldelay="100 " >两次滚动前后间隔100毫秒 </marquee>
11.可以嵌套使用<marquee>。
<marquee behavior="alternate" direction="dowm"> <marquee behavior="alternate">字幕左右上下滚动</marquee> </marquee>