修改input复选框样式
效果:
代码:
input[type='checkbox'] { cursor: pointer; position: relative; width: 18px; height: 18px; font-size: 16px; visibility: hidden; } input[type='checkbox']::after { position: absolute; top: 0; background-color: #fff; color: #fff; border: 1px solid #b1b1b1; width: 18px; height: 18px; display: inline-block; visibility: visible; padding-left: 0px; text-align: center; content: ' '; border-radius: 50%; box-sizing: border-box; } input[type='checkbox']:checked::after { background-color: $color-main; border: none; content: '\2713'; font-size: 14px; font-weight: bold; }