1. 程式人生 > >marquee標簽屬性詳解(跑馬燈文字效果)

marquee標簽屬性詳解(跑馬燈文字效果)

del mouseover 鼠標 AR 百分數 lte 距離 BE 100%

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>無標題文檔</title>
</head>

<
body>   <div>     <marquee direction=up behavior=scroll loop=3 scrollamount=1 scrolldelay=10 align=top bgcolor=#ffffff height=300 width=30% hspace=20 vspace=10 onmouseover=this.stop() onmouseout=this.start()> 此處輸入滾動內容 </marquee>   </div> </body> </html>

  • ◎ direction表示滾動的方向,值可以是left,right,up,down,默認為left
  • ◎ behavior表示滾動的方式,值可以是scroll(連續滾動)slide(滑動一次)alternate(往返滾動)
  • ◎ loop表示循環的次數,值是正整數,默認為無限循環
  • ◎ scrollamount表示運動速度,值是正整數,默認為6
  • ◎ scrolldelay表示停頓時間,值是正整數,默認為0,單位似乎是毫秒
  • ◎ align表示元素的垂直對齊方式,值可以是top,middle,bottom,默認為middle
  • ◎ bgcolor表示運動區域的背景色,值是16進制的RGB顏色,默認為白色
  • ◎ height、width表示運動區域的高度和寬度,值是正整數(單位是像素)或百分數,默認width=100% height為標簽內元素的高度
  • ◎ hspace、vspace表示元素到區域邊界的水平距離和垂直距離,值是正整數,單位是像素。
  • ◎ onmouseover=this.stop() onmouseout=this.start()表示當鼠標以上區域的時候滾動停止,當鼠標移開的時候又繼續滾動

marquee標簽屬性詳解(跑馬燈文字效果)