grammar:
<marquee></marquee>
The following is a simple example:
code show as below:
<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:
<Marquee onMouseOut = "this.start ()" onMouseOver = "this.stop ()"> onMouseOut = "this.start ()": continue scrolling onMouseOver = "this.stop ()" when the mouse is used to set the region out : set the mouse to move the region to stop scrolling </ marquee>
This is a complete example:
code show as below:
<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()">
This is a complete example
</marquee>
The tag supports up to 11 properties:
align
Set <marquee> tag content alignment
absbottom: Absolute Align bottom (lowermost and g, p letters and the like are aligned)
absmiddle: absolute center-aligned
baseline: baseline alignment
bottom: bottom alignment (default)
left: Left
middle: Align middle
right: right alignment
texttop: Snap Top
top: top alignment
code show as below:
<Marquee align = "absbottom"> align = "absbottom": the absolute bottom alignment (with the lowermost g, p letters and the like are aligned). </ Marquee>
<Marquee align = "absmiddle"> align = "absmiddle": Absolute central alignment. </ Marquee>
<Marquee align = "baseline"> align = "baseline": baseline alignment. </ Marquee>
<Marquee align = "bottom"> align = "bottom": bottom alignment (default). </ Marquee>
<marquee align="left">align="left": 左对齐。 </marquee>
<marquee align="middle">align="middle": 中间对齐。 </marquee>
<marquee align="right">align="right": 右对齐。 </marquee>
<Marquee align = "texttop"> align = "texttop": top line alignment. </ Marquee>
<Marquee align = "top"> align = "top": top alignment. </ 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:
<Marquee behavior = "alternate"> alternate: the rolling back and forth between the two ends. </ Marquee>
<Marquee behavior = "scroll"> scroll: the rolling from one end to the other end, is repeated. </ Marquee>
<Marquee behavior = "slide"> slide: the rolling from one end to the other, will not be repeated. </ Marquee>
bgcolor
Subtitles activities set background color, background color available RGB, format or color name hexadecimal value to set.
code show as below:
<Marquee bgcolor = "# 006699"> set the background color of subtitles activities bgcolor = "# 006699" </ marquee>
<Marquee bgcolor = "RGB (10%, 50%, 100%,)"> subtitles activities set the background color bgcolor = "rgb (10%, 50%, 100%,)" </ marquee>
<Marquee bgcolor = "red"> subtitles activities set the background color bgcolor = "red" </ marquee>
direction
Scroll direction subtitles activities set
code show as below:
<Marquee direction = "down"> activities set the scroll direction subtitles direction = "down": Down </ marquee>
<Marquee direction = "left"> subtitles activities set scroll direction direction = "left": the left </ marquee>
<Marquee direction = "right"> setting activities subtitles rolling direction direction = "right": the right </ marquee>
<Marquee direction = "up"> set the scroll direction of the movable subtitles direction = "up": Up </ marquee>
height
Subtitles activities set height
code show as below:
<Marquee height = "500" direction = "down" bgcolor = "# CCCCCC"> subtitles activities set height height = "500" </ marquee>
width
Subtitles activities set width
code show as below:
<Marquee width = "500" bgcolor = "# CCCCCC"> subtitles activities set width 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:
<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:
<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:
<Marquee loop = "- 1" bgcolor = "# CCCCCC"> I'll nap. </ Marquee>
<p> </p>
<Marquee loop = "2" bgcolor = "# CCCCCC"> I only go twice Oh </ marquee>
scrollamount
Scrolling speed setting activities captions, unit pixels
code show as below:
<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:
<marquee scrolldelay="10" >scrolldelay="10" </marquee>
<marquee scrolldelay="100" > scrolldelay="100"</marquee>
<marquee scrolldelay="1000">scrolldelay="1000" </marquee>
<marquee> ... </marquee>
Set mobile properties, such movement is not limited to text, can be applied to images, tables, etc.
Mouse Properties
onMouseOut = this.start () ........ mouse rolling out state
onMouseOver = this.stop () ......... stops scrolling when the mouse passes
direction
<direction=#> #=left, right ,up ,down <marquee direction=left>从右向左移!</marquee>
the way
<Bihavior = #> # = scroll, slide, alternate <marquee behavior = scroll> circle around sidestep! </ Marquee>
<Marquee behavior = slide> go only once rested! </ Marquee>
<Marquee behavior = alternate> go back and forth </ marquee>
cycle
<Loop = #> # = number; If no more than the loop (infinite) <marquee loop = 3 width = 50% behavior = scroll> down only three times </ marquee>
<Marquee loop = 3 width = 50% behavior = slide> only take 3 times </ marquee>
<Marquee loop = 3 width = 50% behavior = alternate> go only 3 times! </ Marquee>
speed
<Scrollamount = #> <marquee scrollamount = 20> la la la, I go so fast yo! </ Marquee>
Delay
<Scrolldelay = #> <marquee scrolldelay = 500 scrollamount = 100> la la la, I go ahead and stop for a while! </ Marquee>
Appearance (Layout) provided
Alignment (the Align)
<align=#> #=top, middle, bottom <font size=6>
<Marquee align = # width = 400> la la la, I will move yeah! </ Marquee>
</font>
Background
<Bgcolor = #> # = rrggbb 16-ary digital, or the following predefined color:
Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime,
Fuchsia, White, Green, Purple, Silver, Yellow, Aqua <marquee bgcolor=aaaaee>颜色!</marquee>
area
<height=# width=#> <marquee height=40 width=50% bgcolor=aaeeaa>面积!</marquee>
blank
(Margins)<hspace=# vspace=#>
<marquee hspace=20 vspace=20 width=150 bgcolor=ffaaaa align=middle>面积!</marquee>
</P>
<Marquee id = "iescroller" direction = left height = 10 onMouseOut = start (); onMouseOver = stop (); scrollamount = 2 scrolldelay = 10 scrollleft = "0" scrolltop = "0" behavior = "alternate" bgcolor = "# 999999 "style =" color: #ffffff; font-size: 14; font-family: 'Arial', 'Arial', 'Helvetica', 'sans-serif' "title = text> this is necessary to move or put text image (iNSERT command can be used to insert a picture where the cursor is placed) </ marquee> </ P>
Scrolling marquee of attribute parameters |
From the <marquee> to start </ marquee> ended, many of the parameters, in fact, have a lot of friends, or application, and let the picture scroll up, is often often used, the following attributes this page do some simple parameters description; Scroll parameters: 1: Direction: DIRECTION left --- left (default) right --- Right On up ------ lower down ---- 2: Mode: BEHAVIOR SCROLL ------- around the scroll (default) SLIDE --------- rolling again ALTERNATE ----- rolling back and forth 3: Number of times: LOOP When LOOP = -1 or LOOP = INFINITE, it indicates that the text is scrolled infinite loop (default) 4: Speed: SCROLLDELAY Any natural integer 5: alignment: the ALIGN TOP --------- Align the top MIDDLE ------ align Central BOTTOM ------ aligned below 6: the mouse across the left onMouseOver=this.stop(); onMouseOut=this.start(); 划过停止滚动。离开,继续滚动 有了以上参数。我们就很容易制作出一个logo图片的任意滚动方式,例如: <marquee width=120 height=200 DIRECTION=up BEHAVIOR=ALTERNATE SCROLLDELAY=120 ALIGN=MIDDLE onMouseOver=this.stop(); onMouseOut=this.start();><a href=http://qjpz.com><img src=http://qjpz.com/bbs/images/logo.gif border=0><marquee> 很容易对照出。这是一个滚动速度为120MM,从下到上碰壁即返回并对齐中间,鼠标划过图标即停止,点击图标进入〈千娇论坛〉的一个来回滚动的代码。 在背景图片上做滚动字幕 <TABLE width="500" border=0> <TBODY> <TR> <TD background=背景图片地址 height=250> <P><MARQUEE scrollAmount=2 scrollDelay=50 direction=up width=200 height=200 behavior=scroll>要滚动的文字</MARQUEE></P></TD></TR></TBODY></TABLE></DIV> 参数设置: a)scrollAmount表示速度,值越大速度越快。如果没有它,默认为6,建议设为1~3比较好 b)scrollDelay也是用来控制速度的,表示走走停停,默认为90,值越大,速度越慢。通常scrollDelay是不需要设置的。 c)direction很明显是表示滚动的方向,默认为从右向左:←,因此如果是向左滚动的话不需要次参数。其他可选的值还有right,down,up。滚动方向分别为:right表示→,up表示↑,down表示↓。 d)width和height用来表示滚动区域的大小,width是宽度,height是高度。特别是在做垂直滚动的时候,一定要设height的值。 e)behavior是来控制滚动属性的,默认为循环滚动(scroll),同样,如果是循环滚动的话可以不需要此参数。其他可选的值还有alternate(交替滚动),slide(幻灯片效果,指的是滚动一次,然后停止滚动)。 f)每行字的前后<FONT color=#990066 size=4 face=隶书>和</FONT>用定义每行字的颜色,大小和字体,如果哪项不需要的话,把代码去掉就行。 |
图片滚动
用<img src=相对路径/文件名>的语句。并且要注意图片名不要中文,要注意区分英文大小写。
图片做超链接
用<a href=>和</a>把<img>包围,并且img必须设border=0,否则图片会出现蓝框。
正确的例子如:
<a href=http://www.sina.com.cn/><img src=../../j/01.jpg border=0></a>
其中a href=表示超链接,这是最常用的。练习的方法也很简单,就是平时用FP或DW做网页的时候,要多查看源代码。
多张图片排列滚动
通常图片和图片之间用<br>(回行)或<p style=margin-top:9>(精确调整图片间的距离)来链接。也可以把你的图片先用表格排版,然后把这个表格的所有语句也加入到marquee中,让这个表格来滚动。
代码如:
<script>document.write('<marquee scrollAmount=2 width=340 height=160 direction=up onmouseover=stop() onmouseout=start()><a href=http://www.sina.com.cn/><img src=../../j/01.jpg border=0></a></marquee>')</script>