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


本文摘自PHP中文网,作者黄舟,侵删。

接下来介绍一下marquee标签

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

常用属性如下:

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

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

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

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

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

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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

<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实现文字轮滚的示例代码的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

HTML5-web storage apis的简述

html4与HTML5的区别有哪些

h5和html的区别是什么

详解HTML5 placeholder属性

怎样用h5的webgl实现3d虚拟机房的漫游动画

如何使用HTML5+css3实现粒子效果文字动画特效(附完整代码)

HTML5本地数据库详情介绍

dreamweaver怎么快速对齐代码? dw对齐代码的设置方法_dreamweaver教程_网页制作

react高阶组件(装饰器)的介绍(代码示例)

总结HTML5中新表单元素的使用方法及实例教程

更多相关阅读请进入《HTML5》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...