滚动文字 --marquee标签

博客展示了一段HTML代码,使用marquee标签实现文字滚动效果,介绍了marquee标签用于设置字体来回滚动需求,常用于网页标题,还详细说明了behavior、direction、scrollamount、scrolldelay等属性的作用,以及鼠标事件触发的动作。

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>    
        <marquee id="affiche" align="left" behavior="scroll" bgcolor="#F00" direction="up" height="300" width="200" hspace="50" vspace="20" loop="-1" scrollamount="1000" scrolldelay="3000" onMouseOut="this.start()" onmouseover="this.stop()">这是一个广告哦!</marquee>
    </body>
</html>

marquee:用于设置字体来回滚动需求、一般用于网页标题

behavior:scroll 一个方向滚动、alternate、来回滚动

direction:设置滚动方向  默认从右往左

srollamount:设置滚动时间  值越大速度越快

scrolldelay:滚动延迟

onmouseover:鼠标移动到上面触发动作  this.stop()  文字停止移动

onmouseout:鼠标移开触发动作 this.start() 文字开始移动

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值