104、非常流行的隐藏导航栏

104、非常流行的隐藏导航栏

1   把如下代码复制到<head></head>之间

 

<SCRIPT language=JavaScript1.2>

 

function move(x, y) {

if (document.all) {

object1.style.pixelLeft += x;

object1.style.pixelTop  += y;}

else

if (document.layers) {

document.object1.left += x;

document.object1.top  += y;

}};

 

function position() {

document.object1.left += -82;

document.object1.top  += 0;

document.object1.visibility = "show"

};

 

function makeStatic() {

if (document.all) {object1.style.pixelTop=document.body.scrollTop+20}

else {eval('document.object1.top=eval(window.pageYOffset+20)');}

setTimeout("makeStatic()",0);}

 

</SCRIPT>

 

<STYLE type=text/css>.hl {

       BACKGROUND-COLOR: green; COLOR: white; CURSOR: hand

}

.n {

      

}

</STYLE>

 

 

2   把如下代码复制到<body></body>之间

 

 

<LAYER class=NS onmouseout="move(-132, 0)"

onmouseover="move(132, 0)" left="0" bgcolor="black" name="object1" top="20"

visibility="hide">

<SCRIPT language=JavaScript1.2>

if (document.all)

document.write('<DIV ID="object1" style="Position : Absolute ;Left : -82px ;Top : 20px ;Width : 0px ;Z-Index : 20">')

</SCRIPT>

 

<TABLE bgColor=#000000 border=0 cellPadding=2 cellSpacing=1

onmouseout="move(-82, 0)" onmouseover=move(82,0) width=100>

  <TBODY>

  <TR>

    <TD bgColor=#009900><FONT face=宋体 size=3><B>导航菜单</B></FONT></TD>

    <TD align=middle bgColor=#006600 rowSpan=100 width=12>

      <SCRIPT language=JavaScript1.2>

if (document.all||document.layers)

document.write('<p align="center"><font size="2" face="Arial Black">S<br>I<br>D<br>E<br>M<br>E<br>N<br>U</font></p>')

</SCRIPT>

    </TD></TR>

  <SCRIPT language=JavaScript1.2>

<!--

if (document.all||document.layers)

makeStatic();

 

if (document.layers) {

window.onload=position;

}

 

var sitems=new Array();

var sitemlinks=new Array();

 

// 配置以下

 

sitems[0]="网页特效集锦";

sitems[1]="背景特效";

sitems[2]="整站模板";

sitems[3]="网页特效";

 

sitemlinks[0]="http://7stk.com";

sitemlinks[1]="http://7stk.com/background/index.htm";

sitemlinks[2]="http://7stk.com/moban/index.htm";

sitemlinks[3]="http://7stk.com/navigation/index.htm";

 

for (i=0;i<=sitems.length-1;i++)

if (document.all) {document.write('<TR><TD bgcolor=white onclick="location=\''+sitemlinks[i]+'\'" onmouseover="className=\'hl\'" onmouseout="className=\'n\'"><FONT SIZE=2>'+sitems[i]+'</FONT></TD></TR>')}

else if (document.layers){document.write('<TR><TD bgcolor="white"><FONT SIZE=2><A HREF="'+sitemlinks[i]+'">'+sitems[i]+'</A></FONT></TD></TR>')}

 

function hl(n) {

n.className='hl'}

function n(h) {

h.className='n'}

//--></SCRIPT>

  </TBODY></TABLE>

<SCRIPT language=JavaScript1.2>

if (document.all)

document.write('<\/DIV>')

</SCRIPT>

</LAYER>

 

 

  

        

 

Write a comment

Comments: 0