motionsites中文站 / 按钮 · Slippery Squid
按钮 · Slippery Squid
aadmin2026-09-19 发布组件1 阅读

按钮 · Slippery Squid

类型:组件 · 分类:按钮 · 收录:2026-09-19 · 源码:会员可见

[hidecontent type="vip1"]
<label class="menuButton" for="check">
    <input type="checkbox" id="check">
    <span class="top"></span>
    <span class="mid"></span>
    <span class="bot"></span>
</label>
<style>
/* From Uiverse.io by Laurits123456 - Tags: button, hamburger, menu, menuicon, 3d button, cool hamburger */
/*pushing a hamburger menu into a pillow texture like background*/

.menuButton {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 13%;
  color: #090909;
  width: 3.5em;
  height: 3.5em;
  border-radius: 0.5em;
  background: #171717;
  border: 1px solid #171717;
  transition: all .3s;
  box-shadow: inset 4px 4px 12px #3a3a3a,
             inset -4px -4px 12px #000000;
}

.menuButton:hover {
  border: 1px solid black;
}

.menuButton:active {
  color: #666;
  box-shadow: 6px 6px 12px #3a3a3a,
             -6px -6px 12px #000000;
}

input[type = "checkbox"] {
  -webkit-appearance: none;
  display: none;
  visibility: hidden;
}

.menuButton span {
  width: 30px;
  height: 4px;
  background: rgb(200,200,200);
  border-radius: 100px;
  transition: 0.3s ease;
}

input[type]:checked ~ span.top {
  transform: translateY(290%)rotate(45deg);
  width: 40px;
}

input[type]:checked ~ span.bot {
  transform: translateY(-270%) rotate(-45deg);
  width: 40px;
  box-shadow: 0 0 10px #495057;
}

input[type]:checked ~ span.mid {
  transform: translateX(-20px);
  opacity: 0;
}
</style>
[/hidecontent]
← 返回首页