marquee标签属性详解 direction 属性 属性的参数值 示例代码 示例 direction="left" 向左(默认值)
<marquee direction="left">我向左滚动</marquee>
direction="right" 向右 <marquee direction="right">我向右滚动</marquee>direction="up"
<marquee direction="up">我向上滚动</marquee>
direction="down" 向下
<marquee direction="down">我向下滚动</marquee>
behavior 属性 属性的参数值 示例代码 示例 behavior="alternate" 来回滚动 <marquee behavior="alternate">我来回滚动</marquee>behavior="scroll" 单方向循环滚动
<marquee behavior="scroll">我单方向循环滚动</marquee>
<marquee behavior="scroll" direction="up" height="30">我改单方向向上循环滚动</marquee>
我改单方向向上循环滚动 behavior="slide" 只滚动一次
<marquee behavior="slide">我只滚动一次</marquee>
<marquee behavior="slide" direction="up">我改向上只滚动一次了</marquee>
我改向上只滚动一次了 loop 属性 属性的参数值 示例代码 示例 loop="2" 滚动2次
<marquee loop="2">我滚动2次。</marquee>
loop="infinite" 无限循环滚动
<marquee loop="infinite">我无限循环滚动。</marquee>
loop="-1" 无限循环滚动
<marquee loop="-1">我无限循环滚动。</marquee>
scrollamount速度属性 scrolldelay 延时属性 属性的参数值 示例代码 示例 scrollamount="100" 速度很快
<marquee scrollamount="100">我速度很快</marquee>
scrollamount="50" 速度慢了些
<marquee scrollamount="50">我慢了些。</marquee>
scrolldelay="30" 小步前进
<marquee scrolldelay="30">我小步前进。</marquee>
scrolldelay="1000" scrollamount="100" 大步前进
<marquee scrolldelay="1000" scrollamount="100">我大步前进。</marquee>
bgcolor 属性 背景颜色 属性的参数值 示例代码 示例
bgcolor属性文字滚动范围的背景颜色,参数值是16进制(形式:#AABBCC或#AA5566等)或预定义的颜色名字(如red、yellow、blue等)。
<marquee behavior=="slide" direction="left" bgcolor="yellow">我的背景色是黄色的</marquee>
width height 属性 属性的参数值 示例代码 示例
width和height属性的作用决定滚动文字在页面中的矩形范围大小。
<marquee width="300" height="30" bgcolor="red">我宽300像素,高30像素。</marquee>
hspace vspace 属性 属性的参数值 示例代码 示例
hspace和vspace属性这两个属性决定滚动矩形区域距周围的空白区域。
<marquee width="300" height="30" vspace="10" hspace="10" bgcolor="red">我矩形边缘水平和垂直距周围各10像素。</marquee> <marquee width="300" height="30" vspace="50" hspace="50" bgcolor="red">我矩形边缘水平和垂直距周围各50像素。</marquee>
onmouseover =this.stop() onmouseout =this.start() 属性 属性的参数值 示例代码 示例 表示当鼠标移上区域的时候滚动停止,当鼠标移开的时候又继续滚动。
<marquee onmouseover=this.stop() onmouseout=this.start()>表示当鼠标移上区域的时候滚动停止,当鼠标移开的时候又继续滚动。</marquee>
valign align 对齐属性 这里是输入文字 这里是输入文字 这里是输入文字 valign 表示元素的垂直对齐方式,值可以是top,middle,bottom,默认为middle。这个属性在TABLE标签的表格处理文字。<MARQUEE scrollAmount=3 behavior=alternate> <TABLE borderColor=#003333 align=center border=1> </MARQUEE> <marquee direction=up width="300" height="200" bgcolor=#ccffff><P align=center>这个属性决定滚动文字位于距形内边框的上下左右位置。</P></marquee> |
|
来自: 昵称27831725 > 《JSP》