Define the [navigation bar] hyperlink style in CSS

1. Case CSS code

  1. <style
  2. .divcss5 a:link{  color :#F00}/* link is red by default */ 
  3. .divcss5 a:hover{ color:#000}/* mouseover black */ 
  4. .divcss5 a:active{ color:#03F}/* blue when the mouse is clicked and released */ 
  5. .divcss5 a:visited{ color:#F0F}/* Visited is pink */ 
  6. /* Set the style of a hyperlink in the divcss5 object */ 
  7. </style

2. Case html code

  1. <div class="divcss5"
  2. DIVCSS5 About 
  3. < href= "http://www.divcss5.com/shili/s57.shtml" >CSS a style </a> Case 
  4. </div

===================

own case,

/*navigation bar*/
.menu a:link{ color:white}/* link defaults to white*/
.menu a:hover{ color:red}/* white on mouseover*/
.menu a:active{ color: yellow}/* White when the mouse is clicked and released*/
.menu a:visited{ color:black}/* Visited is white*/

The above is the css file

<ul class="menu" id="menu">
  <li ><a href=company.php?id=802>首页</a></li>
  <li ><a href=company_introduction.php?id=802>公司介绍</a></li>
  <li ><a href=company_news.php?id=802>资讯美文</a></li>
  <li > <a href= company_XX.php?id=802 >Renovation site </a> </li>
  <li ><a href=company_store.php?id=802>商品展示</a></li>
  <li class="banner_li" ><a href=company_team.php?id=802>优秀员工</a></li>
   
  </ul>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324898444&siteId=291194637