108、可移动的导航条

108、可移动的导航条

脚本说明:

把如下代码加入<body>区域中

<SCRIPT>

var Mouse_Obj="none";

 var pX

 var pY

 document.onmousemove=D_NewMouseMove;

 document.onmouseup=D_NewMouseUp;

 function m(c_Obj)

 { Mouse_Obj=c_Obj;

  pX=parseInt(document.all(Mouse_Obj).style.left)-event.x;

  pY=parseInt(document.all(Mouse_Obj).style.top)-event.y; }

 function D_NewMouseMove()

 {if(Mouse_Obj!="none")

  {document.all(Mouse_Obj).style.left=pX+event.x;

   document.all(Mouse_Obj).style.top=pY+event.y;

   event.returnValue=false;}}

 function D_NewMouseUp()

 {if(Mouse_Obj!="none")

  {Mouse_Obj="none";}}

</SCRIPT>

<STYLE>.up {

       BORDER-RIGHT: #711200 1px solid; PADDING-RIGHT: 1px; BORDER-TOP: white 1px solid; PADDING-LEFT: 1px; FONT-SIZE: 9pt; PADDING-BOTTOM: 1px; BORDER-LEFT: white 1px solid; COLOR: #ff0000; PADDING-TOP: 1px; BORDER-BOTTOM: #711200 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #eadfd0

}

.down {

       BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #711200 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #711200 1px solid; CURSOR: hand; COLOR: #ffffff; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #336699

}

A:link {

       COLOR: #711200; TEXT-DECORATION: none

}

A:visited {

       COLOR: #711200; TEXT-DECORATION: none

}

A:hover {

       COLOR: blue; TEXT-DECORATION: underline

}

</STYLE>

<DIV class=up id=hello

style="; LEFT: expression((document.body.clientWidth-80)/2); WIDTH: 80px; POSITION: absolute; ; TOP: expression((document.body.clientHeight-120)/2); HEIGHT: 120px">

<DIV class=up id=hello

style="; LEFT: expression((document.body.clientWidth+500)/2); WIDTH: 80px; POSITION: absolute; ; TOP: expression((document.body.clientHeight-120)/2); HEIGHT: 120px">

<DIV class=down onmousedown='m("hello")'>-+--+-</DIV>

<DIV style="PADDING-LEFT: 5pt"><A href="http://www.sina.com/"

target=_blank>新浪网</A></DIV>

<DIV style="PADDING-LEFT: 5pt"><A href="http://www.7stk.com/"

target=_blank>网页特效代码</A></DIV>

<DIV style="PADDING-LEFT: 5pt"><A href="http://www.sohu.com/"

target=_blank>搜狐</A></DIV>

<DIV style="PADDING-LEFT: 5pt"><A href="http://www.7stk.com/music/music.htm"

target=_blank>音乐播放器</A></DIV>

<DIV style="PADDING-LEFT: 5pt"><A href="http://www.7stk.com/1/index06.htm"

target=_blank>天气预报代码</A></DIV>

<DIV style="PADDING-LEFT: 5pt"><A href="http://www.7stk.com/caidan/caidan.htm"

target=_blank>菜单特效代码</A></DIV></DIV>

Write a comment

Comments: 0