HTML <marquee>标签用于滚动显示在您的网站页面上水平或垂直向下显示的文本或图像,具体取决于设置。
<!DOCTYPE html> <html> <head> <title>HTML marquee Tag</title> </head> <body> <marquee>This is basic example of marquee</marquee> <marquee direction="up">The direction of text will be from bottom to top.</marquee> </body> </html>
这将产生以下结果-
此标签支持- HTML 中所述的所有全局属性。
HTML <marquee>标签还支持以下附加属性-
Attribute | Value | 描述 |
---|---|---|
behavior | scroll slide alternate | 定义滚动的类型。 |
bgcolor | rgb(x,x,x) #xxxxxx colorname | 不推荐使用-定义滚动内容的方向。 |
direction | up down left right | 定义滚动内容的方向。 |
height | pixels or % | 定义选取框的高度。 |
hspace | pixels | 指定选框周围的水平空间。 |
loop | number | 指定要循环多少次。默认值为INFINITE,这意味着选取框无限循环。 |
scrolldelay | seconds | 定义每次跳转之间延迟多长时间。 |
scrollamount | number | 定义跳多远。 |
width | pixels or % | 定义选取框的宽度。 |
vspace | pixels | 指定选框周围的垂直空间。 |
此标签支持- HTML 中所述的所有事件属性。
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | ? |
这一章你学到了什么?做个笔记,好记忆不如烂笔头! 如果觉得对您有帮助,请分享给您的朋友。
祝学习愉快! (您也可以 选中需要修改的内容->右键->进行编辑)