【问题标题】:when we mouse over a disabled button in FireFox,The title can't display当我们将鼠标悬停在 FireFox 中禁用的按钮上时,标题无法显示
【发布时间】:2010-03-31 01:08:14
【问题描述】:

当我们将鼠标悬停在 FireFox 中禁用的按钮上时,标题无法显示。在 IE 中,此操作正常。

<input type='button' disabled='disabled' title='show title' value='Test'/>

如上,在 IE 中,当我们将鼠标悬停在该按钮上时,会显示“显示标题”。但是在Firefox中它无法工作。有人可以帮助我吗?这将非常感激。

【问题讨论】:

  • 从 Firefox 8 开始,禁用元素的标题会在悬停时显示。

标签: html firefox


【解决方案1】:

似乎是一个(非常古老且非常废弃的)错误。请参阅 Mozilla 错误 #274626 #436770

我想这也可以解释为预期的行为。

想到的一个可怕的解决方法是使用 z-index 将按钮与具有标题属性的不可见 div 重叠;另一个以某种方式重新激活按钮“onmouseover”,但巧妙地拦截并丢弃该按钮上的任何点击事件。

这是从this post引用的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-09-15
    • 1970-01-01
    • 1970-01-01
    • 2017-08-15
    • 2020-07-10
    • 1970-01-01
    • 1970-01-01
    • 2012-10-06
    相关资源
    最近更新 更多