پیش‌نمایش زنده
کد HTML
<div class="button-container">
  <input type="checkbox" id="subscribeCheckbox" class="subscribe-checkbox" />
  <label for="subscribeCheckbox" class="hacker-button">
    <svg
      viewBox="0 0 48 48"
      height="32"
      width="32"
      xmlns="http://www.w3.org/2000/svg"
      class="icon play-icon"
    >
      <path
        class="rect-path"
        d="M43.112 14.394a5 5 0 0 0-3.533-3.533c-2.314-.894-24.732-1.332-31.236.025A5 5 0 0 0 4.81 14.42c-1.045 4.583-1.124 14.491.026 19.177a5 5 0 0 0 3.533 3.533c4.583 1.055 26.371 1.203 31.236 0a5 5 0 0 0 3.533-3.533c1.114-4.993 1.193-14.287-.026-19.203"
        stroke-linejoin="round"
        stroke-linecap="round"
        stroke="currentColor"
        stroke-width="2"
        fill="none"
      ></path>
      <path
        class="triangle-path"
        d="M30.567 23.995L20.12 18.004v11.982Z"
        stroke-linejoin="round"
        stroke-linecap="round"
        stroke="currentColor"
        fill="currentColor"
      ></path>
    </svg>
    <span class="button-text">Activate</span>
    <div class="particle-layer"></div>
  </label>
</div>
کد CSS
.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 800px;
}

/* Hacker Button Styling */
.hacker-button {
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  color: #00ff00;
  padding: 14px 36px;
  font-size: 20px;
  font-family: "Courier New", monospace;
  font-weight: 700;
  border: 2px solid #00ff00;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
}

/* 3D Hover Effects */
.hacker-button:hover {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  transform: rotateX(15deg) rotateY(15deg) translateZ(20px);
  box-shadow:
    0 10px 25px rgba(0, 255, 0, 0.6),
    0 0 40px rgba(0, 255, 0, 0.3),
    inset 0 0 15px rgba(0, 255, 0, 0.2);
  animation:
    flicker 0.2s infinite alternate,
    glowPulse 1.5s infinite;
}

/* 3D Click Effect */
.hacker-button:active {
  transform: scale(0.95) rotateX(-10deg) rotateY(-10deg) translateZ(-10px);
  box-shadow:
    0 0 10px rgba(0, 255, 0, 0.4),
    inset 0 0 20px rgba(0, 255, 0, 0.3);
  animation: glitch 0.3s ease-in-out;
}

/* SVG Animations */
.play-icon {
  transition: transform 0.4s ease;
}

.hacker-button:hover .rect-path {
  animation: pulseRect 1.5s infinite;
}

.hacker-button:hover .triangle-path {
  animation:
    bounceTriangle 0.8s infinite,
    rotateTriangle 2s infinite;
}

/* Particle Layer */
.particle-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(0, 255, 0, 0.2) 0%,
      transparent 50%
    ),
    radial-gradient(circle at 80% 80%, rgba(0, 255, 0, 0.2) 0%, transparent 50%);
  transition: opacity 0.3s ease;
}

/* Particle Effects when Checked */
.subscribe-checkbox:checked + .hacker-button .particle-layer {
  opacity: 1;
  animation:
    particleFlow 4s infinite linear,
    particleBurst 2s infinite;
}

.subscribe-checkbox:checked + .hacker-button .particle-layer::before,
.subscribe-checkbox:checked + .hacker-button .particle-layer::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: #00ff00;
  border-radius: 50%;
  animation: particleFloat 3s infinite ease-in-out;
}

.subscribe-checkbox:checked + .hacker-button .particle-layer::before {
  top: 10%;
  left: 30%;
  animation-delay: 0.5s;
}

.subscribe-checkbox:checked + .hacker-button .particle-layer::after {
  top: 70%;
  left: 60%;
  animation-delay: 1s;
}

/* Hidden Checkbox */
.subscribe-checkbox {
  display: none;
}

/* Subscribed State */
.subscribe-checkbox:checked + .hacker-button {
  background: #00ff00;
  color: #000000;
  border-color: #000000;
  transform: rotateX(10deg) rotateY(10deg) translateZ(15px);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
  animation: pulse3D 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes flicker {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.85;
  }
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 10px 25px rgba(0, 255, 0, 0.6);
  }
  50% {
    box-shadow: 0 15px 35px rgba(0, 255, 0, 0.8);
  }
  100% {
    box-shadow: 0 10px 25px rgba(0, 255, 0, 0.6);
  }
}

@keyframes pulseRect {
  0% {
    stroke-width: 2;
  }
  50% {
    stroke-width: 3.5;
  }
  100% {
    stroke-width: 2;
  }
}

@keyframes bounceTriangle {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes rotateTriangle {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes glitch {
  0% {
    transform: translate(0) rotateX(0) rotateY(0);
  }
  20% {
    transform: translate(-2px, 2px) rotateX(2deg);
  }
  40% {
    transform: translate(2px, -2px) rotateY(-2deg);
  }
  60% {
    transform: translate(-1px, 1px) rotateX(1deg);
  }
  80% {
    transform: translate(1px, -1px) rotateY(-1deg);
  }
  100% {
    transform: translate(0) rotateX(0) rotateY(0);
  }
}

@keyframes particleFlow {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100px 100px;
  }
}

@keyframes particleBurst {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes particleFloat {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  50% {
    transform: translate(20px, -20px);
    opacity: 0.7;
  }
  100% {
    transform: translate(0, 0);
    opacity: 1;
  }
}

@keyframes pulse3D {
  0% {
    transform: rotateX(10deg) rotateY(10deg) translateZ(15px);
  }
  50% {
    transform: rotateX(15deg) rotateY(15deg) translateZ(25px);
  }
  100% {
    transform: rotateX(10deg) rotateY(10deg) translateZ(15px);
  }
}
نوع: button
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05