پیش‌نمایش زنده
کد HTML
<button>
  <b>Airplane!</b>
</button>
کد CSS
button {
  position: relative;
  font-size: 1.2em;
  padding: 0.7em 1.4em;
  background-color: #bf0426;
  text-decoration: none;
  border: none;
  border-radius: 0.5em;
  color: #dedede;
  cursor: pointer;
}

button::before {
  position: absolute;
  content: "";
  height: 0;
  width: 0;
  top: 0;
  left: 0;
  background: linear-gradient(
    135deg,
    rgba(33, 33, 33, 1) 0%,
    rgba(33, 33, 33, 1) 50%,
    rgba(150, 4, 31, 1) 50%,
    rgba(191, 4, 38, 1) 60%
  );
  border-radius: 0 0 0.5em 0;
  transition: 0.3s;
}

button:hover::before {
  width: 3.5em;
  height: 3.5em;
}
button::after {
  position: absolute;
  content: "";
  height: 0;
  width: 0;
  top: 0;
  right: 0;
  background: linear-gradient(
    -135deg,
    rgba(33, 33, 33, 1) 0%,
    rgba(33, 33, 33, 1) 50%,
    rgba(150, 4, 31, 1) 50%,
    rgba(191, 4, 38, 1) 60%
  );
  border-radius: 0 0 0.5em 0;
  transition: 0.3s;
}

button:hover::after {
  width: 3.5em;
  height: 3.5em;
}
button:focus {
  translate: -20px -110px;
  rotate: -30deg;
  transition: 1.2s;
}
button:active {
  transform: translate(0.1em, 0.1em);
}
نوع: button
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05