小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

js滾動--

 FareWe11 2011-01-18

該標簽不是HTML3.2的一部分,并且只支持MSIE3以后內(nèi)核,所以如果你使用非IE內(nèi)核瀏覽器(如:Netscape)可能無法看到下面一些很有意思的效果
該標簽是個容器標簽
語法:

<marquee></marquee>

以下是一個最簡單的例子:

代碼如下:
<marquee><font size=+3 color=red>Hello, World</font></marquee>
下面這兩個事件經(jīng)常用到:
onMouseOut="this.start()" :用來設(shè)置鼠標移出該區(qū)域時繼續(xù)滾動
onMouseOver="this.stop()":用來設(shè)置鼠標移入該區(qū)域時停止?jié)L動
代碼如下:
<marquee onMouseOut="this.start()" onMouseOver="this.stop()">onMouseOut="this.start()" :用來設(shè)置鼠標移出該區(qū)域時繼續(xù)滾動 onMouseOver="this.stop()":用來設(shè)置鼠標移入該區(qū)域時停止?jié)L動</marquee>
這是一個完整的例子:

代碼如下:
<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>

該標簽支持的屬性多達11個:

align
設(shè)定<marquee>標簽內(nèi)容的對齊方式
absbottom:絕對底部對齊(與g、p等字母的最下端對齊)
absmiddle:絕對中央對齊
baseline:底線對齊
bottom:底部對齊(默認)
left:左對齊
middle:中間對齊
right:右對齊
texttop:頂線對齊
top:頂部對齊

代碼如下:
<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
設(shè)定滾動的方式:
alternate: 表示在兩端之間來回滾動。
scroll: 表示由一端滾動到另一端,會重復。
slide: 表示由一端滾動到另一端,不會重復。
代碼如下:
<marquee behavior="alternate">alternate:表示在兩端之間來回滾動。 </marquee>
<marquee behavior="scroll">scroll:表示由一端滾動到另一端,會重復。</marquee>
<marquee behavior="slide">slide: 表示由一端滾動到另一端,不會重復。</marquee>

bgcolor
設(shè)定活動字幕的背景顏色,背景顏色可用RGB、16進制值的格式或顏色名稱來設(shè)定。
代碼如下:
<marquee bgcolor="#006699">設(shè)定活動字幕的背景顏色 bgcolor="#006699"</marquee>
<marquee bgcolor="RGB(10%,50%,100%,)">設(shè)定活動字幕的背景顏色 bgcolor="rgb(10%,50%,100%,)"</marquee>
<marquee bgcolor="red">設(shè)定活動字幕的背景顏色 bgcolor="red"</marquee>

direction
設(shè)定活動字幕的滾動方向
代碼如下:
<marquee direction="down">設(shè)定活動字幕的滾動方向direction="down":向下</marquee>
<marquee direction="left">設(shè)定活動字幕的滾動方向direction="left":向左</marquee>
<marquee direction="right">設(shè)定活動字幕的滾動方向direction="right":向右</marquee>
<marquee direction="up">設(shè)定活動字幕的滾動方向direction="up":向上</marquee>

height
設(shè)定活動字幕的高度
代碼如下:
<marquee height="500" direction="down" bgcolor="#CCCCCC">設(shè)定活動字幕的高度height="500"</marquee>

width
設(shè)定活動字幕的寬度
代碼如下:
<marquee width="500" bgcolor="#CCCCCC">設(shè)定活動字幕的寬度width="500"</marquee>
hspace
設(shè)定活動字幕里所在的位置距離父容器水平邊框的距離
This controls the horizontal(水平)space around the display box.
代碼如下:
<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
設(shè)定活動字幕里所在的位置距離父容器垂直邊框的距離
This controls the vertical(垂直) space around the display box.
代碼如下:
<marquee vspace="100" bgcolor="#CCCCCC">hspace="100"</marquee>
loop
設(shè)定滾動的次數(shù),當loop=-1表示一直滾動下去,默認為-1
代碼如下:
<marquee loop="-1" bgcolor="#CCCCCC">我會不停地走。</marquee>
<p> </p>
<marquee loop="2" bgcolor="#CCCCCC">我只走兩次哦</marquee>

scrollamount
設(shè)定活動字幕的滾動速度,單位pixels
代碼如下:
<marquee scrollamount="10" >scrollamount="10" </marquee>
<marquee scrollamount="20" >scrollamount="20" </marquee>
<marquee scrollamount="30" >scrollamount="30" </marquee>

scrolldelay
設(shè)定活動字幕滾動兩次之間的延遲時間,單位millisecond(毫秒)
值大了會有一步一停頓的效果
代碼如下:
<marquee scrolldelay="10" >scrolldelay="10" </marquee>
<marquee scrolldelay="100" > scrolldelay="100"</marquee>
<marquee scrolldelay="1000">scrolldelay="1000" </marquee>

============================

基本語法
<marquee> ... </marquee>
移動屬性的設(shè)置 ,這種移動不僅僅局限于文字,也可以應用于圖片,表格等等

方向
<direction=#> #=left, right ,up ,down <marquee direction=left>從右向左移!</marquee>

方式
<bihavior=#> #=scroll, slide, alternate <marquee behavior=scroll>一圈一圈繞著走!</marquee>
<marquee behavior=slide>只走一次就歇了!</marquee>
<marquee behavior=alternate>來回走</marquee>

循環(huán)
<loop=#> #=次數(shù);若未指定則循環(huán)不止(infinite) <marquee loop=3 width=50% behavior=scroll>只走 3 趟</marquee> <P>
<marquee loop=3 width=50% behavior=slide>只走 3 趟</marquee>
<marquee loop=3 width=50% behavior=alternate>只走 3 趟!</marquee>

速度
<scrollamount=#> <marquee scrollamount=20>啦啦啦,我走得好快喲!</marquee>

延時
<scrolldelay=#> <marquee scrolldelay=500 scrollamount=100>啦啦啦,我走一步,停一停!</marquee>

外觀(Layout)設(shè)置

對齊方式(Align)
<align=#> #=top, middle, bottom <font size=6>
<marquee align=# width=400>啦啦啦,我會移動耶!</marquee>
</font>

底色
<bgcolor=#> #=rrggbb 16 進制數(shù)碼,或者是下列預定義色彩:
Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime,
Fuchsia, White, Green, Purple, Silver, Yellow, Aqua <marquee bgcolor=aaaaee>顏色!</marquee>

面積
<height=# width=#> <marquee height=40 width=50% bgcolor=aaeeaa>面積!</marquee>

空白
(Margins)<hspace=# vspace=#>
<marquee hspace=20 vspace=20 width=150 bgcolor=ffaaaa align=middle>面積!</marquee>

方向
<direction=#> #=left, right ,up ,down <marquee direction=left>從右向左移!</marquee>

方式
<bihavior=#> #=scroll, slide, alternate <marquee behavior=scroll>一圈一圈繞著走!</marquee>
<marquee behavior=slide>只走一次就歇了!</marquee>
<marquee behavior=alternate>來回走</marquee>

循環(huán)
<loop=#> #=次數(shù);若未指定則循環(huán)不止(infinite) <marquee loop=3 width=50% behavior=scroll>只走 3 趟</marquee> <P>
<marquee loop=3 width=50% behavior=slide>只走 3 趟</marquee>
<marquee loop=3 width=50% behavior=alternate>只走 3 趟!</marquee>

速度
<scrollamount=#> <marquee scrollamount=20>啦啦啦,我走得好快喲!</marquee>

延時
<scrolldelay=#> <marquee scrolldelay=500 scrollamount=100>啦啦啦,我走一步,停一停!</marquee>

外觀(Layout)設(shè)置

對齊方式(Align)
<align=#> #=top, middle, bottom <font size=6>
<marquee align=# width=400>啦啦啦,我會移動耶!</marquee>
</font>

底色
<bgcolor=#> #=rrggbb 16 進制數(shù)碼,或者是下列預定義色彩:
Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime,
Fuchsia, White, Green, Purple, Silver, Yellow, Aqua <marquee bgcolor=aaaaee>顏色!</marquee>

面積
<height=# width=#> <marquee height=40 width=50% bgcolor=aaeeaa>面積!</marquee>

 

本文來自CSDN博客,轉(zhuǎn)載請標明出處:http://blog.csdn.net/strive_bo/archive/2010/08/27/5843647.aspx

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多