語法展示::   http://home.graffiti.net/edfgt665/


請用IE6.0或更新版本觀看語法特效展示
這個跑馬燈很好玩喔...滑鼠向左文字即會向左,滑鼠向右文字即會向右,滑鼠觸碰文字即會停止

將以下程式碼複製,貼在<head>及</head>標籤之間。

<script language="JavaScript">
<!--
var ostat = false;
function scrollstop() {
news.scrollAmount = 0;
ostat = true;
}
function scrollplay() {
news.scrollAmount = 5;
ostat = false;
}
function scrolldir() {
mid = screen.width / 2;
mouse = event.x;
if(mouse > mid) {
if(ostat == false) {
speed = (mouse - mid) / 25;
news.scrollAmount = speed;
}
news.direction = "right";
}
else {
if(ostat == false) {
speed = (mid - mouse) / 25;
news.scrollAmount = speed;
}
news.direction = "left";
   }
}
-->
</script>


將以下程式碼複製,貼在插入<body >標籤裡面。

 onMouseMove="scrolldir()"

將以下程式碼複製,貼在<body>及</body>標籤之間。

<marquee name=news id=news behavior=scroll direction=left scrollamount=5 scrolldelay=1 hspace=0 vspace=0 onmouseover="scrollstop()" onmouseout="scrollplay()">
紫蓮の翼  http://blog.pixnet.net/como0925 有空來逛逛喔</marquee>

arrow
arrow
    全站熱搜

    紫蓮の翼 發表在 痞客邦 留言(0) 人氣()