如何设置CSS禁用复选框? [英] How to set CSS for disabled checkboxes?
问题描述
我想在网格中更改CSS的禁用复选框(他们太难看到的用户)。
I'd like change the CSS for disabled checkboxes in a grid (they are too hard to see for the users). What is a simple way to do this?
我使用的技术偏好(按降序排列):
CSS
JavaScript
jQuery
其他
My preference in technologies used (in descending order):
CSS
JavaScript
jQuery
Other
推荐答案
我建议更改颜色背景(窗体/ fieldset的 background-color
),看看是否可以得到更好的对比度。如果你只是想改变禁用(不可选?)复选框的颜色,你可以尝试:
I'd suggest changing the colour of the background (the background-color
of the form/fieldset), and see if you can come up with a better contrast. If you just want to change the colour of disabled (non-selectable?) checkboxes you can try:
input[disabled] {
...
/* CSS here */
...
}
但是,如果他们因某种原因被禁用,肯定他们不需要显眼地可见?它们的灰色的目的是确保避免在活动/启用和非活动/禁用表单元素之间的混淆?
But if they're disabled for a reason, surely they don't need to be prominently visible? The aim for their being greyed-out is, surely, to avoid confusion between active/enabled and inactive/disabled form elements?
这篇关于如何设置CSS禁用复选框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!