css下拉菜单
在firefox下通过程序代码:
<html> <head> <title>tt</title> <style> #menulist li a:link ,#menulist li a:visited { width:100px; height:20px; color:#3b5998; line-height:20px; text-decoration:none; } #menulist li { width:100px; list-style:none; background:#ffff77; color:#3b5998; text-align:center; border:1px solid red; } #menulist li:hover a { width:100px; color:red; } #menulist li ul { display:none; } #menulist li:hover ul { display:block; position:absolute; top:30px; width:100px; background:blue; padding:0px; margin-left:-1; } #menulist li:hover ul li { display:block; background:red; list-style:none; padding-left:0px; } #menulist li:hover ul li a { height:20px; display:block; background:yellowgreen; list-style:none; color:red; } #menulist li:hover ul li a:hover { height:20px; top:50px; background:#000; list-style:none; } </style> </head> <body> <ul id="menulist"> <li> <a href="#">menu</a> <ul> <li><a href=#>1</a></li> <li><a href=#>2</a></li> </ul> </li> </ul> </body> </html>