پیش‌نمایش زنده
کد HTML
<button class="button">
  <div class="container">
    <div class="window window_one"></div>
    <div class="window window_two"></div>
    <div class="window window_three"></div>
    <div class="window window_four"></div>
  </div>
  <div class="active_line"></div>
  <span class="text">Windows 11</span>
</button>
کد CSS
.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.3em;
  height: 5.3em;
  border: none;
  cursor: pointer;
  border-radius: 0.4em;
  background: rgba(240, 240, 240, 0.9);
}

.container {
  position: relative;
  width: 3.5em;
  height: 3.5em;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.2em;
}

.window {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.window_one {
  background-color: rgb(100, 175, 230);
  border-top-left-radius: 0.2em;
}

.window_two {
  background: linear-gradient(135deg, rgb(100, 175, 230), rgb(0, 120, 212));
  border-top-right-radius: 0.2em;
}

.window_three {
  background: linear-gradient(135deg, rgb(100, 175, 230), rgb(0, 120, 212));
  border-bottom-left-radius: 0.2em;
}

.window_four {
  background-color: rgb(0, 120, 212);
  border-bottom-right-radius: 0.2em;
}

.button:focus .container {
  animation: wow 1s forwards;
}

@keyframes wow {
  20% {
    scale: 0.8;
  }

  30% {
    scale: 1;
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }

  65% {
    transform: translateY(4px);
  }

  80% {
    transform: translateY(0);
  }

  100% {
    scale: 1;
  }
}

.text {
  content: "";
  position: absolute;
  top: -4.5em;
  width: 7.7em;
  height: 2.6em;
  background-color: #666;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  border-radius: 5px;
  text-shadow: 0 0 10px rgb(0, 0, 0);
  opacity: 0;
  transition: all 0.25s linear;
}

.button:hover .text {
  opacity: 1;
}
نوع: button
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05