不显示在Mozilla Firefox中禁用的HTML按钮工具提示 [英] Tooltip is not displayed for a disabled html button in mozilla firefox

查看:194
本文介绍了不显示在Mozilla Firefox中禁用的HTML按钮工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆