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

按钮 · Splendid Snail

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

[hidecontent type="vip1"]
<button class="btn">Hover me !
    <div class="background"></div>
</button>
<style>
/* From Uiverse.io by garerim - Tags: button */
.btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 25px;
  font-weight: 600;
  height: 40px;
  line-height: 40px;
  cursor: pointer;
  background-color: inherit;
  border: none;
  outline: none;
  color: #f1f1f1;
}

.btn:hover .background {
  height: inherit;
  width: 120%;
  top: 50%;
}

.btn .background {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 3px;
  width: 100%;
  background-color: #006b92;
  z-index: -1;
  border-radius: 5px;
  transition: all 0.3s;
}
</style>
[/hidecontent]
← 返回首页