motionsites中文站 / 按钮 · Rude Snake
按钮 · Rude Snake
aadmin2026-09-19 发布组件0 阅读

按钮 · Rude Snake

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

[hidecontent type="vip1"]
<button>
    Hover
</button>
<style>
/* From Uiverse.io by Cornerstone-04 - Tags: button */
button {
  display: flex;
  align-items: center;
  color: #000;
  background: none;
  border: none;
  padding: 12px 18px;
  position: relative;
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 700;
  font-family: monospace;
  transition: linear .3s;
}

button:hover {
  color: #fff;
}

button::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translateX(calc(100% + 4px));
  width: 45px;
  height: 45px;
  background-color: #dc143c;
  border-radius: 50px;
  transition: transform .25s .25s cubic-bezier(0, 0, .5, 2), width .25s cubic-bezier(0, 0, .5, 2);
  z-index: -1;
}

button:hover::before {
  width: 100%;
  transform: translateY(-50%) translateX(-18px);
  transition: transform .25s cubic-bezier(0,0,.5,2);
}
</style>
[/hidecontent]
← 返回首页