ASP.Net checkbox missing CSS class

前端 未结 5 1618
走了就别回头了
走了就别回头了 2020-12-17 15:03

I have the following ASP.Net check box control added to a page:

Bu

5条回答
  •  伪装坚强ぢ
    2020-12-17 15:56

    Ok, when you apply a CssClass to the ASP.Net check box control it applies the class to a span that wraps the check box. Because the css class isn't applied directly to the element it doesn't override the class that has been applied to all input elements.Therefore I used jQuery to select the element and apply the necessary style.

    $("input[type=checkbox]").addClass("myClass");
    

提交回复
热议问题