如果网页中定义的中英文字体不同,这会导致下划线不对齐。这种情况在IE浏览器中存在,Firefox浏览器无此问题。解决办法是:

a:hover
{
    border
:none;
    text-decoration
:underline;
    color
:#ff9900;
    *vertical-align
:baseline;//如果是IE浏览器这设置此样式
}

 

     CSS中用四个伪类来定义链接的样式,分别是:a:link、a:visited、a:hover和a : active,可以简记为 LVHA:


a:link
{font-weight : bold ;text-decoration : none ;color : #c00 ;}
a:visited 
{font-weight : bold ;text-decoration : none ;color : #c30 ;}
a:hover 
{font-weight : bold ;text-decoration : underline ;color : #f60 ;}
a:active 
{font-weight : bold ;text-decoration : none ;color : #90 ;} 

 

相关文章:

  • 2021-12-06
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2022-01-03
  • 2022-01-19
  • 2022-12-23
  • 2021-11-13
  • 2021-07-03
  • 2022-12-23
相关资源
相似解决方案