我正在写这行代码;
<INPUT TYPE="BUTTON" class="configurationButton" id="btnAddButton" style="width:60px;" name="btnAddButton" value="Add" disabled>
加载时,按钮变为禁用,但其颜色仍为黑色。由于 .configurationButton , , 中有默认的黑色,请告诉我上面标签示例中禁用按钮的颜色应该是什么?
检查JS小提琴
.configurationButton
{
background:black;
color:white;
cursor:pointer;
}
.configurationButton:disabled
{
background:white;
color:gray;
cursor:default;
opacity:0.2;
}
理想情况下禁用的按钮应该看起来像灰色。你可以查看这个 URL,如果你想知道不同状态下按钮的样式应该是什么 - http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-buttons.php
HTML 标准没有指定输入标签的外观和感觉。每个浏览器和每个桌面环境都有自己的外观和感觉。