html中 导航条消除代码,好东西~导航条HTML代码

注:看不懂没关系,复制到DW里看看效果哦~~~

横向菜单

td {

FONT-SIZE: 13px; COLOR: #000000; LINE-HEIGHT: 22px;

}

div{

background-color:#669933;

text-align:center;position:absolute;z-index:2;display:none; }

A {FONT-SIZE: 13px; COLOR: #000000; TEXT-DECORATION: none;

background-color:#dfdfdf;

width:100px;line-height:22px;text-align:center;border-bottom:1 #FFFFFF solid;}

A:hover {FONT-SIZE: 13px; COLOR: #FFFFFF;

background-color:#cc0000;

width:100px;line-height:22px;text-align:center;}

function show(d1){

document.getElementByIdx(d1).style.display='block'; //显示层

}

function hide(d1){

document.getElementByIdx(d1).style.display='none'; //隐藏层

}

题1 题2 题3 题4 题5 题6

2851622989156890329.jpg

还一个

var headHeight = 22;var bodyHeight = 202;var objcount = 6;var step = 10;var moving = false;

function showme(obj1, obj2)

{

if (moving)

return;

moving = true;

for(i=0;i

if (document.all.tags('td')[i].className.indexOf('headtd') == 0)

document.all.tags('td')[i].className = 'headtd1';

obj2.className = 'headtd2';

moveme(obj1);

}

function moveme(obj)

{

idnumber = parseInt(obj.id.substr(4));

objtop = headHeight * (idnumber - 1);

objbuttom = bodyHeight + headHeight * (idnumber - 2);

currenttop = parseInt(obj.style.top);

if (currenttop >= objbuttom)

{

countid = 1;

for(i=0;i

if (document.all.tags('div')[i].id == 'item'+countid+'body')

{

obj = document.all.tags('div')[i];

objtop = headHeight * (countid - 1);

if (countid == idnumber)

{

moveup(obj,objtop,false);

break;

}

else

moveup(obj,objtop,true);

countid++;

}

}

else if ((currenttop >= objtop) && (idnumber < objcount))

{

idnumber++;

countid = objcount;

for(i=document.all.tags('div').length-1;i>=0;i--)

if (document.all.tags('div')[i].id == 'item'+countid+'body')

{

obj = document.all.tags('div')[i];

objbuttom = bodyHeight + headHeight * (countid - 2);

if (countid == idnumber)

{

movedown(obj,objbuttom,false);

break;

}

else

movedown(obj,objbuttom,true);

countid--;

}

}

}

function moveup(obj,objtop,ismove)

{

currenttop = parseInt(obj.style.top);

if (currenttop > objtop)

{

obj.style.top = currenttop - step;

setTimeout('moveup('+obj.id+','+objtop+','+ismove+')',1)

return;

}

moving = ismove;

}

function movedown(obj,objbuttom,ismove)

{

currenttop = parseInt(obj.style.top);

if (currenttop < objbuttom)

{

obj.style.top = currenttop + step;

setTimeout('movedown('+obj.id+','+objbuttom+','+ismove+')',1)

return;

}

moving = ismove;

}

.headtd1 { background: #eaeaea; border: 1px outset; border-color: #ffffff #000000 #000000 #ffffff; cursor: hand; font-size: 9pt}.headtd2 { background: #cccccc; border: 1px outset; border-color: #ffffff #000000 #000000 #ffffff; cursor: hand; font-size: 9pt}.bodytd { background: #eeeeee; border: 1px outset; border-color: #ffffff #000000 #000000 #ffffff; font-size: 9pt}

菜单1
菜单1
test
菜单2
test
菜单3
test
菜单4
test
菜单5
test
菜单6
test
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值