zl程序教程

您现在的位置是:首页 >  工具

当前栏目

一个qq菜单效果

QQ 一个 效果 菜单
2023-06-13 09:13:57 时间
这么一个简单的效果就花了偶两个多小时,失败。。。看来还是写的太少,眼高手低!!以后还要多动手写,不能只知道实现方法就pass了废话少说,代码如下(这个可是结构,样式,行为相分离哦):
newdocument *{margin:0px;padding:0px;} #menu{ font-size:12px; list-style-type:none; width:100px;text-align:center; } #m1,#m2,#m3,#m4{ border:1pxsolid#666; height:20px;line-height:20px; background:#ccc;width:98px; } #m1_sub,#m2_sub,#m3_sub,#m4_sub{ display:inline-block; } ul#menuliulli{ border:1pxsolid#999; height:20px;line-height:20px; background:#efefef;list-style-type:none; } functiontoggleMenu(){ varaTitle=newArray(); if(arguments.length==0)returnfalse; //获取对象 var$=function(id){ returndocument.getElementById?document.getElementById(id):document.all[id]; } //将获取参数转换为数组 for(vari=0;i 菜单1
  • 11111111111
  • 11111111111
菜单2
  • 22222222222
  • 22222222222
菜单3
  • 33333333333
  • 33333333333
菜单4
  • 44444444444
  • 44444444444