<div class="checkbox-container"> <input class="checkbox-input" id="animated-checkbox" type="checkbox" /> <label class="checkbox" for="animated-checkbox"> <span class="line line1"></span> <span class="line line2"></span> </label> </div>
.checkbox-container { display: flex; justify-content: center; align-items: center; } .checkbox-input { display: none; } .checkbox { position: relative;