用CSS編寫一個網頁導覽列

來源:互聯網
上載者:User
css|導航|網頁 列表標籤:
<ul id="bar">
  <li><a href="#">導航標題</a></li>
  <li><a href="#">導航標題</a></li>
  <li><a href="#">導航標題</a></li>
  <li><a href="#">導航標題</a></li>
  <li><a href="#">導航標題</a></li>
</ul>

相應CSS:
#bar{
list-style:none;
}
#bar li{
float:left;
}
#bar li a{
float:left;
padding:7px 10px;
border:1px solid #444;
margin:5px;
background-color:#666;
color:#C00;
}
#bar li a:hover{
color:#CF0;
background-color:#444;
}

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.