html - 鼠标悬停仅在 firefox 中不起作用

标签 html css firefox hover underline

在花费数小时后,我尝试并隔离了以下问题。第一个链接在 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/

相关文章:

php - 如何摆脱页脚下方的这个额外部分 - Bootstrap

javascript - div 上的奇怪填充

html - 页面底部的空白栏

javascript - 页面中的菜单滚动动画

javascript - 编辑主题文件时侧边菜单高度的 CSS 不会改变

javascript - 你如何通过 Firefox 扩展来操作选定的文本

html - 如何让一大组图片向右浮动

html - 单击任何单选按钮以切换开关

html - 按钮在 chrome 中工作但在 mozilla 中不起作用

javascript - Firefox 中的 ClientX 和 ClientY 引用错误?