有時看到網頁中會有一些晃動...升降幕的文字,使用者透過簡單易見的文字訊息,弄成跑馬燈型式,以抓住瀏覽者的眼光。

  這是怎麼做到的!!<marquee>語法便擁有跑馬燈的功能,不論是左向右、右向左、上降下、下升上,都可以控制,以下就是<marquee>的魅力效果展示說明。


語  法 項  目 參  數 語      法 範   例
跑馬燈
<marquee>
排列位置
align
left <marquee align=left>染布坊</marquee> 染布坊
center <marquee align=center>染布坊</marquee> 染布坊
right <marquee align=right>染布坊</marquee> 染布坊
top <marquee align=top>染布坊</marquee> 染布坊
middle <marquee align=middle>染布坊</marquee> 染布坊
bottom <marquee align=bottom>染布坊</marquee> 染布坊
寬度
width
自訂數值 <marquee width=150>染布坊</marquee> 染布坊
% <marquee width=80%>染布坊</marquee> 染布坊
高度
height
自訂數值 <marquee height=30>染布坊</marquee> 染布坊
% <marquee height=120%>染布坊</marquee> 染布坊
左右空白
hspace
自訂數值 <marquee hspace=15>染布坊</marquee> 染布坊
上下空白
vspace
自訂數值 <marquee vspace=5>
dye.mycha.to<br>
染布坊<br>
網路資源收集<br>
音樂收集</marquee>
dye.mycha.to
染布坊
網路資源收集
音樂收集
運作方式
behavior
scroll <marquee behavior=scroll>染布坊</marquee> 染布坊
slide <marquee behavior=slide>染布坊</marquee> 染布坊
alternate <marquee behavior=alternate>染布坊</marquee> 染布坊
方向
direction
up <marquee direction=up>染布坊</marquee> dye.mycha.to
染布坊
網路資源收集
音樂收集
left <marquee direction=left>染布坊</marquee> 染布坊
right <marquee direction=right>染布坊</marquee> 染布坊
速度
scrollamount
自訂數值 <marquee scrollamount=4>染布坊</marquee> 染布坊
重複次數
loop
自訂數值 <marquee loop=5>染布坊</marquee> 染布坊
背景顏色
bgcolor
自訂色碼 <marquee bgcolor=EECCFF>染布坊</marquee> 染布坊


以上所列舉的語法應用皆可以複合性的搭配使用:

測試範例:

  語法:
  <marquee direction=up behavior=alternate width=500 height=100><font style= width=500;filter: shadow(color=#9999FF)><marquee behavior=alternate> <font size=5><b>MyChat.to 染布坊</b><br>http://dye.chat.to</b></font></marquee></font></marquee>

  實例:

MyChat.to 染布坊
https://mychat.to/dye