中英字体不同导致的下划线不对齐问题

     如果网页中定义的中英文字体不同,这会导致下划线不对齐。这种情况在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 ;} 

 

posted @ 2009-01-16 10:58  梦想天空(山边小溪)  阅读(1981)  评论(1编辑  收藏  举报