--------------------------------------------------
点此查看示例文件
--------------------------------------------------
先看看效果:
CSS 部分的代码:
CSS:
<style type="text/css"> <!-- body, td, div, p, span, textarea, select { font-size: 12px; font-family: verdana, arial, helvetica, sans-serif } a { color: #DCB20C; text-decoration: none; font-size: 12px; } a:hover { color: #CC9933; text-decoration: underline; font-size: 12px; } h2 { font-size: 1.1em; margin:0; line-height: 1; } #categories { width: 170px; float: left; margin: 0 5px 10px 5px; } #categories ul { font-size: 1.0em; margin:0; padding:0; list-style: none; } #categories li { margin: 0; padding: 0; border-bottom: 1px dotted #BBE0EB; } #categories a { display: block; text-decoration: none; padding: 3px 5px 3px 10px; height: 17px; color: #4896AC; } #categories a:hover { background:#F0FDE2; } #categories h2 { padding: 10px 0 10px 0; clear: both; margin: 0; color: #83CDE1; } .clear { clear: both; } --> </style>
HTML 部分的代码:
HTML:
<div id="categories"> <h2>Categories</h2> <ul> <li><a href="#">Business</a></li> <li><a href="#">Entertainment</a></li> <li><a href="#">Other</a></li> <li><a href="#">Personal</a></li> <li><a href="#">Photography</a></li> <li><a href="#">Portal / Magazine</a></li> <li><a href="#">Sports</a></li> </ul> </div>
本文只是摘录原网站的部分代码, 目的是整理其实现技巧, 如果您有其他目的或用途, 请联系原网站.


