<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>3.1纵向列表</title> <link href="3.1.css" mce_href="3.1.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="menue"> <ul> <li><a href="#" mce_href="#">首页</a></li> <li><a href="#" mce_href="#">网页版式布局</a></li> <li><a href="#" mce_href="#">div+css教程</a></li> <li><a href="#" mce_href="#">div+css实例</a></li> <li><a href="#" mce_href="#">常用代码</a></li> <li><a href="#" mce_href="#">站长杂谈</a></li> <li><a href="#" mce_href="#">技术文档</a></li> <li><a href="#" mce_href="#">资源下载</a></li> <li><a href="#" mce_href="#">图片素材</a></li> </ul> </div> </body> </html>
css文件
#menue ul { margin: 0px; padding: 0px; list-style: none; } body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.5; } #menue { border: 1px solid #669900; width: 100px; } #menue ul li { line-height: 26px; background: #eee; padding: 0px 8px; height: 26px; border-bottom: 1px solid #ccc; } a { color: #000000; text-decoration: none; } a:hover { color: #FF0000; }
最终效果: