Change Style/Look of Asp:CheckBox using CSS

前端 未结 10 1063
醉梦人生
醉梦人生 2020-12-10 13:55

I want to change the standard \"3D\" look of the standard asp.net checkbox to say solid 1px. If I try to apply the styling to the Border for example it does just that - draw

10条回答
  •  爱一瞬间的悲伤
    2020-12-10 14:34

    Keep in mind that the asp:CheckBox control actually outputs more than just a single checkbox input.

    For example, my code outputs

    
        
    
    

    where CheckBoxStyle is the value of the CssClass attribute applied to the control and cbCheckBox is the ID of the control.

    To style the input, you need to write CSS to target

    span.CheckBox input {
      /* Styles here */
    }
    

提交回复
热议问题