h5教程html5实现文字轮滚的示例代码

 所属分类:web前端开发

 浏览:111次-  评论: 0次-  更新时间:2022-10-26
描述:更多教程资料进入php教程获得。 接下来介绍一下marquee标签marquee标签是实现文字轮滚的大功臣常用属性如下:directory 指明轮滚方向(默...
更多教程资料进入php教程获得。 接下来介绍一下marquee标签

marquee标签是实现文字轮滚的大功臣

常用属性如下:

directory 指明轮滚方向(默认向左)

behavior 指明轮滚方式(默认是scroll)

Hspace 指明元素到区域的水平距离

Vspace 指明元素到区域的垂直距离

loop 指明循环次数(默认-1表示无限循环)

下面是我做的一个小栗子,大家可以试一试哦

<html>
    <head>
        <title> 文字轮滚</title>
        <meta charset="utf-8">
    </head>
    <body>
    <p align=center><marquee Hspace=6 scrollamount=3 width=200 height=40 bgcolor=red scrolldelay=1 behavior="scroll" directory="right">我是Cabby****人送外号白菜姐</marquee></p> 
    <p align=center><marquee Hspace=6 scrollamount=5 width=200 height=40 bgcolor=yellow scrolldelay=0 behavior=alternate>啦啦啦啦啦啦啦</marquee></p>
    <p align=center><marquee Hspace=6 scrollamount=3 width=200 height=40 bgcolor=red scrolldelay=1 behavior="scroll" directory="right" loop=-1>我是Cabby****人送外号白菜姐</marquee></p>
     <p align=center><marquee Hspace=6 scrollamount=5 width=200 height=40 bgcolor=yellow scrolldelay=0 behavior=alternate loop=-1>啦啦啦啦啦啦啦</marquee></p>
    <p align=center><marquee Hspace=6 scrollamount=3 width=200 height=40 bgcolor=red scrolldelay=1 behavior="scroll" directory="right">我是Cabby****人送外号白菜姐</marquee></p>
    </body>
    
</html>
登录后复制

以上就是html5实现文字轮滚的示例代码的详细内容,更多请关注zzsucai.com其它相关文章!

 标签: HTML5,h5,代码,
积分说明:注册即送10金币,每日签到可获得更多金币,成为VIP会员可免金币下载! 充值积分充值会员更多说明»

讨论这个素材(0)回答他人问题或分享使用心得奖励金币

〒_〒 居然一个评论都没有……

表情  文明上网,理性发言!