Answers for "checkbox css"

2

color checkbox css when clicked

input[type=checkbox]:checked {
  /*CSS after CHECKED*/
  color: #ffd369;
}
Posted by: Guest on December-03-2020
3

checkbox input in css

//all checkbox
input[type="checkbox"]{
  box-shadow: 0 0 0 3px hotpink;
}

// all checked checkbox
input[type="checkbox"]:checked {
  box-shadow: 0 0 0 3px hotpink;
}
Posted by: Guest on November-18-2020
-1

css style a checkbox

/*this creates a circle checkbox with another smaller circle
inside when checked, it looks nice ...*/
input[type='checkbox'] {
    -webkit-appearance:none;
    display:inline-block;
    width:16px;
    height:16px;
    padding:0px;
    margin:0px;
    margin-right:5px;
    background:white;
    border-radius:20px;
    border:1px solid #ddd;
    border: 1px solid #dee2e6;                                                
    box-sizing:content-box;                                                   
    line-height:16px;                                                         
    vertical-align: sub;                                                      
    position:relative;
}                                                                             
input[type='checkbox']:checked {                                     
    border:1px solid  #55468c;                                                
}                                                                             
input[type='checkbox']:checked:after{                                
  content:'';                                                                 
  position: absolute;                                                         
  width: 12px;                                                                
  height: 12px;                                                               
  border-radius: 12px;                                                         
  background: #55468c;                                                        
  top:50%;                                                                    
  transform: translateY(-50%);                                                
  margin-left: auto;
  margin-right: auto;
  left: 0;
  right: 0;
}
Posted by: Guest on September-30-2021
0

radio button css design for registration page

<!DOCTYPE html>
<html>
<head>

<style>
    input[type = checkbox]{
          -webkit-appearance: none;
          background-color: #fafafa;
          border: 1px solid #cacece;
          box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05);
          padding: 9px;
          border-radius: 3px;
          display: inline-block;
          position: relative;    
    }

    input[type = checkbox]:checked {
        background-color: #e9ecee;
        border: 1px solid #adb8c0;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05), inset 15px 10px -12px rgba(255,255,255,0.1);
        color: #99a1a7;
    }


</style>
</head>

<body>

<form>
  <input type="checkbox" name="gender" value="male" checked> Male<br>
  <input type="checkbox" name="gender" value="female"> Female<br>
  <input type="checkbox" name="gender" value="other"> Other  
</form> 

</body>
</html>
Posted by: Guest on December-03-2020
4

how to make html checkboxes

<input type="checkbox" id="vehicle1" name="vehicle1" value="Bike">
<label for="vehicle1"> I have a bike</label><br>
Posted by: Guest on November-23-2020

Browse Popular Code Answers by Language