CSS中的禁用按钮? [英] Disabled Buttons in CSS?

查看:146
本文介绍了CSS中的禁用按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图获得一个按钮,看起来完全相同无论是启用还是禁用,但每当我禁用按钮,似乎忽略任何我设置的字体样式。这似乎是在IE,但不是其他浏览器的情况。

I'm trying to get a button which looks exactly the same whether it is enabled or disabled, but whenever I disable the button it seems to ignore any font styles I have set. This seems to be the case in IE but not other browsers.

因此,任何人都知道CSS更改禁用按钮,以使字体不压印?

So does anybody know the CSS to change a disabled button so that the font is not embossed?

提前感谢,
Chris

Thanks in advance, Chris


CSS如下: / p>

The CSS is as follows:


.Button
{
    background-color:#332F27;
    border-bottom-color:#1B1B1B;
    border-top-color:#3B3B3B;
    border-left-color:#3B3B3B;
    border-right-color:#0C0C0C; 
    color:Black;
    font-style:normal;
}

按钮具有属性Class =Button
[/ Edit]

The button has the attribute Class="Button" [/Edit]

推荐答案

如果你改变按钮的disabled属性,那么你将无法获得CSS的正常按钮的感觉和外观

If you are changing the disabled property of the button then you won't be able to get the feel and look of a normal button with CSS which will work in all browsers.

最简单的方法是 添加没有点击事件的另一个按钮

如果你仍然想要使用CSS,你可以参考这个链接。

If you still want to use CSS for this you can refer this link.

样式禁用表单控件CSS

这篇关于CSS中的禁用按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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