پیش‌نمایش زنده
کد HTML
<label>
  <input class="input" type="checkbox" />
  <span class="custom-checkbox"></span>
</label>
کد CSS
.input[type="checkbox"] {
  display: none;
}

/* Style for the custom checkbox */
.custom-checkbox {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid lime;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}

/* Style for the custom checkmark */
.custom-checkbox::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: lime;
  border-radius: 50%;
  opacity: 0;
}

/* Show the checkmark when checkbox is checked */
.input[type="checkbox"]:checked + .custom-checkbox::after {
  opacity: 1;
}
نوع: checkbox
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05