پیش‌نمایش زنده
کد HTML
<label class="neon-checkbox">
  <input type="checkbox" />
  <div class="neon-box"></div>
</label>
کد CSS
.neon-checkbox {
  display: inline-block;
  position: relative;
  cursor: pointer;
  width: 40px;
  height: 40px;
}

.neon-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.neon-box {
  width: 100%;
  height: 100%;
  background: #111;
  border: 2px solid #333;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.neon-checkbox input:checked ~ .neon-box {
  border-color: #0f0;
  box-shadow:
    0 0 15px #0f0,
    inset 0 0 10px #0f0;
}

.neon-box::after {
  content: "";
  width: 20px;
  height: 20px;
  background: #0f0;
  border-radius: 2px;
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px #0f0;
}

.neon-checkbox input:checked ~ .neon-box::after {
  transform: scale(1);
}
نوع: button
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05