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

按钮 · Odd Dragonfly

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

[hidecontent type="vip1"]
<button>Hover me</button>
<style>
/* From Uiverse.io by garerim - Tags: button */
button {
  z-index: 2;
  display: block;
  width: fit-content;
  height: auto;
  outline: none;
  border: none;
  background-color: inherit;
  font-size: 24px;
  font-weight: bold;
  padding: 10px 20px;
  position: relative;
  cursor: pointer;
}

button::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  z-index: 3;
  position: absolute;
  top: 0%;
  left: 0%;
  transform: scaleX(0.2) scaleY(0.5) translate(250%, 100%);
  border-top: solid 2px #333;
  border-left: solid 4px #333;
  transition: all .4s ease-in-out;
}

button::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  z-index: 3;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%) scaleX(0.2) scaleY(0.5);
  border-bottom: solid 2px #333;
  border-right: solid 4px #333;
  transition: all .4s ease-in-out;
}

button:hover::before {
  transform: translate(0%, 0%) scaleX(1) scaleY(1);
  border-top: solid 1px #333;
  border-left: solid 1px #333;
}

button:hover::after {
  transform: scaleX(1) scaleY(1) translate(0%, 0%);
  border-bottom: solid 1px #333;
  border-right: solid 1px #333;
}
</style>
[/hidecontent]
← 返回首页