gpt4 book ai didi

html - 禁用后html中Button的颜色应该是什么?

转载 作者:太空宇宙 更新时间:2023-11-03 21:48:36 24 4
gpt4 key购买 nike

我正在写这行代码;

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

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

最佳答案

检查 JS fiddle

http://jsfiddle.net/Usj5Q/

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

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

关于html - 禁用后html中Button的颜色应该是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18956563/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com