不显示在Mozilla Firefox中禁用的HTML按钮工具提示 [英] Tooltip is not displayed for a disabled html button in mozilla firefox
问题描述
Mozilla Firefox浏览器将不会显示禁用的控件的工具提示。是否有另一种方式来显示他们吗?
Mozilla Firefox will not display tooltips of disabled controls. Is there another way to display them?
我想preFER的解决方案,而无需使用JavaScript的。
I would prefer a solution without using javascript.
有一个简单的方法我能找到的是CSS样式改变是
There is an easy method I could find is to change in css styles is
button,
input
{
position: relative;
width: 200px;
}
button[disabled]:hover:before,
input[disabled]:hover:before
{
position: absolute;
top: 10px;
left: 10px;
content: attr(title);
background-color: #ffffe1;
color: #000;
line-height: 10pt;
font-size: 8pt;
border: 1px solid #000;
z-index:10000;
padding:2px;
}
这工作在按钮元素的情况下罚款,但对于输入型按钮控制/元素不起作用。
This works fine in case of button element, but does not work for the input type button control/element.
推荐答案
使用JavaScript工具提示添加动态HTML工具提示努力。然后,你不会'需要依赖浏览器如何不同的渲染为残疾人HTML元素的工具提示。
trying using a javascript tool tip to add dynamic html tool tips. Then you wont' need to rely on how different browsers render tool tips for disabled html elements.
这篇关于不显示在Mozilla Firefox中禁用的HTML按钮工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!