CSS垂直导航栏

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8" content="This is a meta data" name="dengyexun">
 5     <title>Title</title>
 6     <link rel="stylesheet" type="text/css" href="home.html">
 7     <style>
 8         ul{
 9             list-style-type: none;
10             margin: 10px;
11             padding: 0px;
12         }
13         a:link, a:visited{
14             display: block;
15             font-weight: bold;
16             color: white;
17             background-color: #98bf21;
18             text-align: center;
19             width: 120px;
20             padding: 10px;
21             text-transform: uppercase;
22         }
23         a:hover, a:active{
24             background-color: orangered;
25         }
26     </style>
27 </head>
28 <body>
29     <ul>
30         <li><a href="home.html">Home</a></li>
31         <li><a href="home.html">News</a></li>
32         <li><a href="home.html">Contact</a></li>
33         <li><a href="home.html">About</a></li>
34     </ul>
35 
36 </body>
37 </html>

显示结果:

 

posted @ 2017-11-23 16:53  今夜无风  阅读(585)  评论(0编辑  收藏  举报