پیش‌نمایش زنده
کد HTML
<div class="container">
  <button class="hybrid-button"><span>Click Me</span></button>
</div>
کد CSS
.container {
  min-height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hybrid-button {
  /* Base structure */
  position: relative;
  display: inline-block;
  padding: 20px 40px;
  margin: 20px;

  /* Glassmorphism base */
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;

  /* Neumorphic depth */
  box-shadow:
    8px 8px 16px rgba(163, 177, 198, 0.5),
    -8px -8px 16px rgba(255, 255, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);

  /* Skeuomorphic texture */
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPjxwYXRoIGZpbGw9InJnYmEoMCwwLDAsMC4wMikiIGQ9Ik0wIDBoNXY1SDB6Ii8+PC9zdmc+"),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.05));

  /* Interaction */
  cursor: pointer;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: perspective(600px) translateZ(0);
}

/* Neumorphic typography */
.hybrid-button span {
  position: relative;
  z-index: 1;
  font-family: "Helvetica", Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #5a6478;
  text-shadow:
    2px 2px 4px rgba(163, 177, 198, 0.5),
    -2px -2px 4px rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

/* Glass highlight */
.hybrid-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0)
  );
  border-radius: 20px 20px 0 0;
  opacity: 0.9;
  transition: all 0.4s ease;
  pointer-events: none;
}

/* Skeuomorphic inner detail */
.hybrid-button::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.15),
    rgba(0, 0, 0, 0.05)
  );
  box-shadow:
    inset 2px 2px 4px rgba(163, 177, 198, 0.2),
    inset -2px -2px 4px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  pointer-events: none;
}

/* Hover state */
.hybrid-button:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow:
    12px 12px 24px rgba(163, 177, 198, 0.6),
    -12px -12px 24px rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: perspective(600px) translateZ(10px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hybrid-button:hover::before {
  height: 60%;
  opacity: 1;
}

.hybrid-button:hover::after {
  box-shadow:
    inset 3px 3px 6px rgba(163, 177, 198, 0.25),
    inset -3px -3px 6px rgba(255, 255, 255, 0.35);
}

.hybrid-button:hover span {
  text-shadow:
    3px 3px 6px rgba(163, 177, 198, 0.6),
    -3px -3px 6px rgba(255, 255, 255, 0.8);
  transform: translateZ(2px);
}

/* Active state */
.hybrid-button:active {
  background: rgba(255, 255, 255, 0.15);
  box-shadow:
    4px 4px 8px rgba(163, 177, 198, 0.4),
    -4px -4px 8px rgba(255, 255, 255, 0.5),
    inset 4px 4px 8px rgba(163, 177, 198, 0.3),
    inset -4px -4px 8px rgba(255, 255, 255, 0.2);
  transform: perspective(600px) translateZ(-2px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.1s ease;
}

.hybrid-button:active::before {
  height: 40%;
  opacity: 0.7;
}

.hybrid-button:active::after {
  box-shadow:
    inset 4px 4px 8px rgba(163, 177, 198, 0.35),
    inset -4px -4px 8px rgba(255, 255, 255, 0.25);
}

.hybrid-button:active span {
  text-shadow:
    1px 1px 2px rgba(163, 177, 198, 0.4),
    -1px -1px 2px rgba(255, 255, 255, 0.6);
  transform: translateZ(-1px);
}

/* Focus state */
.hybrid-button:focus {
  outline: none;
  box-shadow:
    8px 8px 16px rgba(163, 177, 198, 0.5),
    -8px -8px 16px rgba(255, 255, 255, 0.6),
    0 0 0 4px rgba(163, 177, 198, 0.3);
}

/* Load animation */
@keyframes hybridPop {
  0% {
    transform: perspective(600px) scale(0.95) translateZ(0);
  }
  50% {
    transform: perspective(600px) scale(1.03) translateZ(8px);
  }
  100% {
    transform: perspective(600px) scale(1) translateZ(0);
  }
}

.hybrid-button {
  animation: hybridPop 0.6s ease-out forwards;
}

/* Ripple effect */
.hybrid-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: none;
}

.hybrid-button:active::after {
  width: 200px;
  height: 200px;
  opacity: 0;
  transition: all 0.5s ease-out;
}
نوع: button
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05