【轉】marquee標籤簡介

來源:互聯網
上載者:User

標籤:

本文轉自:http://www.360doc.com/content/12/0818/16/8351655_230872993.shtml

marquee文法
    <marquee></marquee>

執行個體一
<marquee>Hello, World</marquee>

marquee常用到的兩個事件:
onMouseOut="this.start()" 當滑鼠移出該地區時
onMouseOver="this.stop()" 當滑鼠移入該地區時

執行個體二
<marquee onMouseOut="this.start()" onMouseOver="this.stop()">marquee常用到的兩個事件</marquee>

下面開始說一下marquee所支援的屬性

behavior設定滾動的方式:
    alternate:來復原動。
    scroll:   重複滾動。
    slide:    不重複滾動。

代碼如下:

<marquee behavior="alternate">來復原動。 </marquee>

<marquee behavior="scroll">重複滾動。</marquee>

<marquee behavior="slide">不重複滾動。</marquee>

 

bgcolor設定活動字幕的背景顏色。

代碼如下:

<marquee bgcolor="#006699">設定活動字幕的背景顏色</marquee>

<marquee bgcolor="RGB(10%,50%,100%,)">設定活動字幕的背景顏色 </marquee>

<marquee bgcolor="red">設定活動字幕的背景顏色</marquee>

 

direction設定活動字幕的滾動方向

代碼如下:

<marquee direction="down">設定活動字幕的滾動方向向下</marquee>

<marquee direction="left">設定活動字幕的滾動方向向左</marquee>

<marquee direction="right">設定活動字幕的滾動方向向右</marquee>

<marquee direction="up">設定活動字幕的滾動方向向上</marquee>

 

height設定活動字幕的高度

代碼如下:

<marquee height="500" direction="down" bgcolor="#CCCCCC">設定活動字幕的高度</marquee>

 

width設定活動字幕的寬度

代碼如下:

<marquee width="500" bgcolor="#CCCCCC">設定活動字幕的寬度</marquee>

 

loop設定滾動的次數,當loop=-1表示一直滾動下去,預設為-1

代碼如下:

<marquee loop="-1" bgcolor="#CCCCCC">我會不停地走。</marquee>

<marquee loop="2" bgcolor="#CCCCCC">我只走兩次哦</marquee>

 

scrollamount設定活動字幕的捲動速度,單位pixels

代碼如下:

<marquee scrollamount="10" >scrollamount="10" </marquee>

<marquee scrollamount="20" >scrollamount="20" </marquee>

<marquee scrollamount="30" >scrollamount="30" </marquee>

 

scrolldelay設定活動字幕滾動兩次之間的延遲時間,單位millisecond(毫秒)

值大了會有一步一停頓的效果

代碼如下:

<marquee scrolldelay="10" >scrolldelay="10" </marquee>

<marquee scrolldelay="100" > scrolldelay="100"</marquee>

<marquee scrolldelay="1000">scrolldelay="1000" </marquee>

【轉】marquee標籤簡介

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.