html5实现文字轮滚的示例代码
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实现文字轮滚的示例代码的详细内容,更多请关注教程集其它相关文章!
-->您可能感兴趣的文章:
html5实现文字轮滚的示例代码
JS滚轮事件onmousewheel的用法
如何使用插件数字滚动插件numberAnimate.js?
jquery 文字上下滚动效果的代码
Js 图片滚动的实现方法
用HTML5制作屏幕手势解锁功能
javascript事件之鼠标滚轮(mousewheel)和DOMMouseScroll事件
jQuery 幻灯片插件(带缩略图功能)
在webstorm中使用H5的快捷键
如何配置H5的滚动条样式的代码