CSS

    How to change color of input radio and checkbox


    Introduction

    Input type radio and checkbox is the type of input, you can easily apply property of color and background color in input box element like input type text, search, number, email etc, but its difficult to apply property on checkbox or radio so here is a solution.

    Just give accent-color: red; Your Favorite color.

    Example

    <form action="">    <div>        <label for="checkbox1">Checkbox</label>        <input type="checkbox" name="checkbox" id="checkbox1">     </div>     <div>         <label for="radio1">Radio 1</label>         <input type="radio" name="radio" id="radio1"></div> </form> // css file input[type="checkbox"]{    accent-color: red;}input[type="radio"]{    accent-color: red;}

     

    Ready to transform your business with our technology solutions? Contact Us today to Leverage Our CSS Expertise.

    Share

    facebook
    LinkedIn
    Twitter
    Mail
    CSS

    Related Center Of Excellence