二级菜单

把主页面都做的差不多了,就差图片轮播了,二级菜单还是用hidden做的,因为有些菜单是一直显示在那的,用二级菜单不太好弄哇 hidden虽然麻烦点,但效果还是挺不错的

 

 

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.listdiv{
top:20px;
position: absolute;
}




</style>
</head>
<body>
<span class="a">11111</span>
<span class="b">22222</span>
<span class="c">333333</span>
<div class="a1" >
<p>12311111111111111111</p>
<p>12311111111111111111</p>
<p>12311111111111111111</p>
<p>12311111111111111111</p></div>
<div class="b1" hidden="hidden">
<p>23122222222222222222</p>
<p>23122222222222222222</p>
<p>23122222222222222222</p>
<p>23122222222222222222</p></div>
<div class="c1" hidden="hidden">
<p>32133333333333333333</p>
<p>32133333333333333333</p>
<p>32133333333333333333</p>
<p>32133333333333333333</p></div>
</body>
</html>
<script>

a=document.getElementsByClassName("a")[0];
b=document.getElementsByClassName("b")[0];
c=document.getElementsByClassName("c")[0];
a1=document.getElementsByClassName("a1")[0];
b1=document.getElementsByClassName("b1")[0];
c1=document.getElementsByClassName("c1")[0];

a.onmouseover=function(){
b1.setAttribute("hidden","hidden")
c1.setAttribute("hidden","hidden")
a1.removeAttribute("hidden");

}

b.onmouseover=function(){
a1.setAttribute("hidden","hidden")
c1.setAttribute("hidden","hidden")
b1.removeAttribute("hidden");

}

c.onmouseover=function(){
a1.setAttribute("hidden","hidden")
b1.setAttribute("hidden","hidden")
c1.removeAttribute("hidden");

}


</script>

转载于:https://www.cnblogs.com/m110/p/7624565.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值