首页社区帖校启约程序
启约手机建站程序之滚动标签
2022/3/9 17:47:0412阅
仅限排版使用,部分浏览器不支持效果。以下仅简单说明,更多请自行查询资料。

基本语法
<marquee></marquee>

简单例子
<marquee>Hello,NuoHa.</marquee>

下面这两个事件经常用到:
onMouseOut="this.start()" 用来设置鼠标移出该区域时继续滚动
onMouseOver="this.stop()" 用来设置鼠标移入该区域时停止滚动

代码如下:
<marquee onMouseOut="this.start()">用来设置鼠标移出该区域时继续滚动</marquee>
<marquee onMouseOver="this.stop()">用来设置鼠标移入该区域时停止滚动</marquee>
<marquee onMouseOut="this.start()" onMouseOver="this.stop()">完整代码</marquee>

滚动方向
<marquee direction="down">向下滚动</marquee>
<marquee direction="left">向左滚动</marquee>
<marquee direction="right">向右滚动</marquee>
<marquee direction="up">向上滚动</marquee>

<marquee direction="up" onMouseOut="this.start()">向上滚动,鼠标移出该区域时继续滚动</marquee>
<marquee direction="up" onMouseOver="this.stop()">向上滚动,鼠标移入该区域时停止滚动</marquee>
<marquee direction="up" onMouseOut="this.start()" onMouseOver="this.stop()">向上滚动,完整代码</marquee>

字幕高度
<marquee height="500">设定活动字幕的高度height="500"</marquee>
<marquee direction="up" height="80" onMouseOut="this.start()" onMouseOver="this.stop()">向上滚动,完整代码,活动字幕的高度height="80"</marquee>

字幕宽度
<marquee width="500">设定活动字幕的宽度width="500"</marquee>

滚动速度
scrollamount 表示运动速度,值是正整数,默认为6,值越大速度越快。
<marquee direction="up" height="80" scrollamount="1" onMouseOut="this.start()" onMouseOver="this.stop()">向上滚动,完整代码,活动字幕的高度height="80",我走得很慢</marquee>
<marquee direction="up" height="80" scrollamount="10" onMouseOut="this.start()" onMouseOver="this.stop()">向上滚动,完整代码,活动字幕的高度height="80",我走得很快</marquee>
0
首页社区帖校启约程序