单击时如何突出显示菜单链接 [英] how to highlight a menu link when clicked

查看:87
本文介绍了单击时如何突出显示菜单链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

css:



< style type =text / css>



。 backround

{

保证金:0px 0;

填充:0;

position:absolute;

background-image:url('Images / imageback.jpg');

font-family:Times New Roman;

font-size:small;

宽度:自动;

身高:自动;

字体大小:19px;

font-weight:粗体;

text-decoration:none;

}

.div

{

宽度:自动;

保证金:0px自动;

}

div ul li a:link,div ul li a:visited

{

display:block;

background-color:#006699;

font-family:Arial,Helvet ica,sans-serif;

font-weight:bold;

font-size:14px;

color:#c1bfd5;

text-align:center;

text-decoration:none;

padding:2px;

border-bottom:1px实心#fff;

宽度:150px;

行高:30px;

}









div ul a a:hover

{

background-color:#030;



}

div ul li a:active,div ul li a.active

{

背景颜色:红色;

}













li ul li a:link,li ul li a:visited

{

disp lay:block;

background-color:#99ccff;

font-family:Arial,Helvetica,sans-serif;

font-weight :正常;

字体大小:12px;

颜色:蓝色;

text-align:center;

text-decoration:none;

填充:2px;

border-bottom:1px solid #fff;

宽度:150px;

行高:30px;

}





li ul li a:悬停

{

背景色:#CCFFFF;

}

li ul li a:active,li ul li a.active

{

background-color:Red;

}



ul

{

list-style-type:none;

保证金:0px;

填充:0px;

宽度:1092px;

}

div ul

{

float:left;

宽度:150px;

}



ul li ul li

{

float:none;

margin-left:0px;

}







li ul

{

display:none;

仓位:绝对;

}

li:悬停ul

{

显示:无;

}

.style1

{

身高:25px;

}

.highlight_stay

{

背景颜色:红色;

}







< / style>











  • 导入


    • 员工大师
    • 薪水
    • 月工资明细
    • css :

      <style type="text/css">

      .backround
      {
      margin: 0px 0;
      padding: 0;
      position: absolute;
      background-image: url( 'Images/imageback.jpg' );
      font-family: Times New Roman;
      font-size: small;
      width: auto;
      height: auto;
      font-size: 19px;
      font-weight: bold;
      text-decoration: none;
      }
      .div
      {
      width: auto;
      margin: 0px auto;
      }
      div ul li a:link, div ul li a:visited
      {
      display: block;
      background-color: #006699;
      font-family: Arial, Helvetica, sans-serif;
      font-weight: bold;
      font-size: 14px;
      color: #c1bfd5;
      text-align: center;
      text-decoration: none;
      padding: 2px;
      border-bottom: 1px solid #fff;
      width: 150px;
      line-height: 30px;
      }




      div ul li a:hover
      {
      background-color: #030;

      }
      div ul li a:active,div ul li a.active
      {
      background-color:Red;
      }






      li ul li a:link, li ul li a:visited
      {
      display: block;
      background-color: #99ccff;
      font-family: Arial, Helvetica, sans-serif;
      font-weight: normal;
      font-size: 12px;
      color: Blue;
      text-align: center;
      text-decoration: none;
      padding: 2px;
      border-bottom: 1px solid #fff;
      width: 150px;
      line-height: 30px;
      }


      li ul li a:hover
      {
      background-color: #CCFFFF;
      }
      li ul li a:active,li ul li a.active
      {
      background-color:Red;
      }

      ul
      {
      list-style-type: none;
      margin: 0px;
      padding: 0px;
      width: 1092px;
      }
      div ul li
      {
      float: left;
      width: 150px;
      }

      ul li ul li
      {
      float: none;
      margin-left: 0px;
      }



      li ul
      {
      display: none;
      position: absolute;
      }
      li:hover ul
      {
      display:none;
      }
      .style1
      {
      height: 25px;
      }
      .highlight_stay
      {
      background-color: Red;
      }



      </style>




查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆