在花费数小时后,我尝试并隔离了以下问题。第一个链接在 FF 中悬停时没有下划线,但在我尝试过的所有其他浏览器中都有效。第二个链接在 Firefox 中也能正常工作。网站上现有的大部分 html 都是按以下方式构建的,因此将不胜感激网站范围内的修复。
HTML: (在此处粘贴代码会删除标签) http://pastebin.com/duqfKGeY
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
FF test
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="ff.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table>
<tbody>
<tr>
<td>
<ul type="disc">
<li>
<a target="_blank" href="http://example1.com">
<font size="2" color="#b80000"><b>Example Link 1</b></font></a>
<br>
<font size="2" face="Verdana">
example text example text example text example text example text example text example text example text example text example text example text example text example text example text example text example text example text
<a target="_blank" href="http://example2.com/">
<font size="2" face="Verdana" color="#b80000">Example link 2</font>
</a>
example text example text example text example text example text example text example text example text example text example text example text example text example text example text example text example text example text .
</font>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</body>
</html>
CSS:
a{color:#b80000;}
a:link{color:#b80000;text-decoration:none;}
a:visited{color:#b80000;text-decoration:none;}
a:hover{color:#b80000;text-decoration:underline;}
a:active{color:#b80000;}
编辑:在 W3C 验证器上验证没有任何错误
最佳答案
<B>
标签覆盖了 text-decoration
.只需添加:
a:hover b{text-decoration:underline;}
如果还有其他你甚至可以做的事情:
a:hover > *{text-decoration:underline;}
关于html - 鼠标悬停仅在 firefox 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5044935/