0

我正在写这行代码;

<INPUT TYPE="BUTTON" class="configurationButton" id="btnAddButton" style="width:60px;" name="btnAddButton" value="Add" disabled>

加载时,按钮变为禁用,但其颜色仍为黑色。由于 .configurationButton , , 中有默认的黑色,请告诉我上面标签示例中禁用按钮的颜色应该是什么?

4

3 回答 3

2

检查JS小提琴

http://jsfiddle.net/Usj5Q/

.configurationButton
{
    background:black;
    color:white;
    cursor:pointer;
}

.configurationButton:disabled
{
    background:white;
    color:gray;
    cursor:default;
    opacity:0.2;

}

于 2013-09-23T10:50:43.233 回答
1

理想情况下禁用的按钮应该看起来像灰色。你可以查看这个 URL,如果你想知道不同状态下按钮的样式应该是什么 - http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-buttons.php

于 2013-09-23T10:12:27.167 回答
1

HTML 标准没有指定输入标签的外观和感觉。每个浏览器和每个桌面环境都有自己的外观和感觉。

于 2013-09-23T10:14:19.860 回答