Detailed html marquee properties in

Transfer: https://www.jb51.net/web/531309.html

The label is not part of HTML3.2, and only supports MSIE3 after the kernel, so if you use a non-IE browser kernel (such as: Netscape) may not be able to see some very interesting results below

The tag is a tag containers

grammar:

?
1
< marquee ></ marquee >

The following is a simple example:

code show as below:

?
1
< marquee >< font size=+3 color = red >Hello, World</ font ></ marquee >

The following two events frequently used:

onMouseOut = "this.start ()": continue to roll out when the mouse is used to set the region

onMouseOver = "this.stop ()": Set the mouse is used to move the stop scrolling region

code show as below:

?
1
< marquee onMouseOut = "this.start()" onMouseOver = "this.stop()" >onMouseOut="this.start()" :用来设置鼠标移出该区域时继续滚动 onMouseOver="this.stop()":用来设置鼠标移入该区域时停止滚动</ marquee >

This is a complete example:

code show as below:

?
1
2
3
< marquee id = "affiche" align = "left" behavior = "scroll" bgcolor = "#FF0000" direction = "up" height = "300" width = "200" hspace = "50" vspace = "20" loop = "-1" scrollamount = "10" scrolldelay = "100" onMouseOut = "this.start()" onMouseOver = "this.stop()" >
这是一个完整的例子
</ marquee >

The tag supports up to 11 properties:

align

Set <marquee> tag content alignment

absbottom: Absolute aligned at the bottom (the lowermost end of g, p and other letters aligned)
absmiddle: Absolute central alignment
baseline: baseline alignment
bottom: bottom alignment (default)
left: Left
middle: intermediate aligned
right: right alignment
texttop: top line of alignment
top: top alignment

code show as below:

?
1
2
3
4
5
6
7
8
9
< marquee align = "absbottom" >align="absbottom":绝对底部对齐(与g、p等字母的最下端对齐)。 </ marquee >
< marquee align = "absmiddle" >align="absmiddle": 绝对中央对齐。 </ marquee >
< marquee align = "baseline" >align="baseline": 底线对齐。 </ marquee >
< marquee align = "bottom" >align="bottom": 底部对齐(默认)。 </ marquee >
< marquee align = "left" >align="left": 左对齐。 </ marquee >
< marquee align = "middle" >align="middle": 中间对齐。 </ marquee >
< marquee align = "right" >align="right": 右对齐。 </ marquee >
< marquee align = "texttop" >align="texttop": 顶线对齐。 </ marquee >
< marquee align = "top" >align="top": 顶部对齐。 </ marquee >

behavior

Set rolling manner:

alternate: the rolling back and forth between the two ends.

scroll: the rolling from one end to the other end, is repeated.

slide: the rolling from one end to the other, will not be repeated.

code show as below:

?
1
2
3
< marquee behavior = "alternate" >alternate:表示在两端之间来回滚动。 </ marquee >
< marquee behavior = "scroll" >scroll:表示由一端滚动到另一端,会重复。</ marquee >
< marquee behavior = "slide" >slide:  表示由一端滚动到另一端,不会重复。</ marquee >

bgcolor

Subtitles activities set background color, background color available RGB, format or color name hexadecimal value to set.

code show as below:

?
1
2
3
< marquee bgcolor = "#006699" >设定活动字幕的背景颜色 bgcolor="#006699"</ marquee >
< marquee bgcolor = "RGB(10%,50%,100%,)" >设定活动字幕的背景颜色 bgcolor="rgb(10%,50%,100%,)"</ marquee >
< marquee bgcolor = "red" >设定活动字幕的背景颜色 bgcolor="red"</ marquee >

direction

Scroll direction subtitles activities set

code show as below:

?
1
2
3
4
< marquee direction = "down" >设定活动字幕的滚动方向direction="down":向下</ marquee >
< marquee direction = "left" >设定活动字幕的滚动方向direction="left":向左</ marquee >
< marquee direction = "right" >设定活动字幕的滚动方向direction="right":向右</ marquee >
< marquee direction = "up" >设定活动字幕的滚动方向direction="up":向上</ marquee >

height

Subtitles activities set height

code show as below:

?
1
< marquee height = "500" direction = "down" bgcolor = "#CCCCCC" >设定活动字幕的高度height="500"</ marquee >

width

Subtitles activities set width

code show as below:

?
1
< marquee width = "500" bgcolor = "#CCCCCC" >设定活动字幕的宽度width="500"</ marquee >

hspace

Distance subtitles activities set in the position where the distance from the parent container level border

This controls the horizontal(水平)space around the display box.

code show as below:

?
1
2
3
4
5
< table width = "500" border = "1" align = "center" cellpadding = "0" cellspacing = "0" >
   < tr >
     < td >< marquee hspace = "100" bgcolor = "#CCCCCC" >hspace="100"</ marquee ></ td >
   </ tr >
</ table >

vspace

Distance subtitles activities set in the position where the vertical distance from the parent container border

This controls the vertical(垂直) space around the display box.

code show as below:

?
1
< marquee vspace = "100" bgcolor = "#CCCCCC" >hspace="100"</ marquee >

loop

Set the number of rolling, when loop = -1 has been expressed scroll down, defaults to -1

code show as below:

?
1
2
3
< marquee loop = "-1" bgcolor = "#CCCCCC" >我会不停地走。</ marquee >
< p >&nbsp;</ p >
< marquee loop = "2" bgcolor = "#CCCCCC" >我只走两次哦</ marquee >

scrollamount

Scrolling speed setting activities captions, unit pixels

code show as below:

?
1
2
3
< marquee scrollamount = "10" >scrollamount="10" </ marquee >
< marquee scrollamount = "20" >scrollamount="20" </ marquee >
< marquee scrollamount = "30" >scrollamount="30" </ marquee >

scrolldelay

Rolling subtitles activities set the delay time between the two units millisecond (ms)

There will be a big step in the value of a pause effect

code show as below:

?
1
2
3
< marquee scrolldelay = "10" >scrolldelay="10" </ marquee >
< marquee scrolldelay = "100" > scrolldelay="100"</ marquee >
< marquee scrolldelay = "1000" >scrolldelay="1000" </ marquee >

Guess you like

Origin www.cnblogs.com/sharpest/p/11514787.html