How to style a disabled checkbox?

后端 未结 9 651
旧巷少年郎
旧巷少年郎 2021-01-07 16:32

Do you know how I could style a checkbox when it is disabled?

E.g.:



        
9条回答
  •  不知归路
    2021-01-07 17:06

    Use CSS's :disabled selector (for CSS3):

    checkbox-style { }
    checkbox-style:disabled { }
    

    Or you need to use javascript to alter the style based on when you enable/disable it (Assuming it is being enabled/disabled based on your question).

提交回复
热议问题