پیش‌نمایش زنده
کد HTML
<label class="cyber-scanner">
  <input type="checkbox" />
  <div class="scanner-box">
    <span class="corner top-left"></span>
    <span class="corner top-right"></span>
    <span class="corner bottom-left"></span>
    <span class="corner bottom-right"></span>
    <div class="scan-center"></div>
  </div>
</label>
کد CSS
.cyber-scanner {
  display: inline-block;
  cursor: pointer;
}
.cyber-scanner input {
  display: none;
}

.scanner-box {
  width: 40px;
  height: 40px;
  position: relative;
  background: rgba(0, 255, 0, 0.1);
  transition: 0.3s;
}

.corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: #0f0;
  border-style: solid;
  transition: all 0.3s ease;
}

.top-left {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}
.top-right {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}
.bottom-left {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}
.bottom-right {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.scan-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: #0f0;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 0 10px #0f0;
}

.cyber-scanner input:checked ~ .scanner-box {
  box-shadow: inset 0 0 15px #0f0;
}

.cyber-scanner input:checked ~ .scanner-box .top-left {
  top: 10px;
  left: 10px;
}
.cyber-scanner input:checked ~ .scanner-box .top-right {
  top: 10px;
  right: 10px;
}
.cyber-scanner input:checked ~ .scanner-box .bottom-left {
  bottom: 10px;
  left: 10px;
}
.cyber-scanner input:checked ~ .scanner-box .bottom-right {
  bottom: 10px;
  right: 10px;
}

.cyber-scanner input:checked ~ .scanner-box .scan-center {
  transform: translate(-50%, -50%) scale(2.5);
  background: #fff;
}
نوع: button
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05