Change Style/Look of Asp:CheckBox using CSS

前端 未结 10 1087
醉梦人生
醉梦人生 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

    paste this code in your css and it will let you customize your checkbox style. however, it's not the best solution, it's pretty much displaying your style on top of the existing checkbox/radiobutton.

       input[type='checkbox']:after 
    {
    
            width: 9px;
            height: 9px;
            border-radius: 9px;
            top: -2px;
            left: -1px;
            position: relative;
            background-color: #3B8054;
            content: '';
            display: inline-block;
            visibility: visible;
            border: 3px solid #3B8054;
            transition: 0.5s ease;
            cursor: pointer;
    
    }
    
    input[type='checkbox']:checked:after 
        {
            background-color: #9DFF00;
        }
    

提交回复
热议问题