鼠標移動到文字滾動離開則返回原狀
發(fā)布日期:[2009/11/25] 編輯:奇億廣州網站建設
一般文字滾動是鼠標移動到文字后停止,離開后又滾動的,但這代碼則相反,文字默認為靜止,鼠標移動到文字上時則滾動,離開后又返回原來靜止狀態(tài)。
<marquee id="maqtxt1" on mouseover="this.start()" on mouseout="this.scrollLeft=110;this.stop()" direction=left behavior=alternate height=25 width=110 scrollamount=2 scrolldelay=10>求鼠標移動到文字上文字左右滾動特效!</marquee>
<SCRIPT>
document.all.maqtxt1.scrollLeft=110;document.all.maqtxt1.stop()</SCRIPT>
<br><br>
<marquee id="maqtxt2" on mouseover="this.start()" on mouseout="this.scrollLeft=110;this.stop()" direction=left behavior=alternate height=25 width=110 scrollamount=2 scrolldelay=10>求鼠標移動到文字上文字左右滾動特效!</marquee>
<SCRIPT>
document.all.maqtxt2.scrollLeft=110;document.all.maqtxt2.stop()</SCRIPT>
復制后請將代碼中on mouseover和on mouseout中間的空格去掉。