#e8e8e8
1.input[type="checkbox"] { 2 display: none; 3} 4 5 6 /* Style for the custom checkbox */ 7.custom-checkbox { 8 display: inline-block; 9 width: 20px; 10 height: 20px; 11 border: 2px solid #333; 12 border-radius: 4px; 13 position: relative; 14 cursor: pointer; 15} 16 17 /* Style for the custom checkmark */ 18.custom-checkbox::after { 19 content: ""; 20 position: absolute; 21 top: 50%; 22 left: 50%; 23 transform: translate(-50%, -50%); 24 width: 10px; 25 height: 10px; 26 background-color: #333; 27 border-radius: 2px; 28 opacity: 0; 29} 30 31 /* Show the checkmark when checkbox is checked */ 32.input[type="checkbox"]:checked + .custom-checkbox::after { 33 opacity: 1; 34}
402 views
402 views
Comments
MIT License