CSS
CSS 导航栏
提示:查看 - 完全样式的垂直导航栏的示例.
源代码:
点击运行 »
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> ul { list-style-type: none; margin: 0; padding: 0; } a:link, a:visited { display: block; font-weight: bold; color: #FFFFFF; background-color: #98bf21; width: 120px; text-align: center; padding: 4px; text-decoration: none; text-transform: uppercase; } a:hover, a:active { background-color: #7A991A; } </style> </head> <body> <ul> <li><a href="#home">Home</a></li> <li><a href="#news">News</a></li> <li><a href="#contact">Contact</a></li> <li><a href="#about">About</a></li> </ul> </body> </html>
运行结果:
点击运行 »