跳至主要內容

按钮模版:btn-dark-3

望间模板按钮小于 1 分钟

<div class="container">
  <button class="btn-dark-3"><span>View Room</span></button>
</div>
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  width: 100%;
  height: 200px;
}
@keyframes flow {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.btn-dark-3 {
  position: relative;
  border-radius: 6px;
  color: #fff;
  z-index: 2;
  overflow: hidden;
  padding: 3px;
  border: none;
  cursor: pointer;
}
.btn-dark-3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    115deg,
    #4fcf70,
    #fad648,
    #a767e5,
    #12bcfe,
    #44ce7b
  );
  background-size: 50% 100%;
}
.btn-dark-3:hover:before {
  animation: flow 0.75s linear infinite;
}
.btn-dark-3 span {
  position: relative;
  display: block;
  height: 100%;
  z-index: 2;
  padding: 16px 28px;
  align-items: center;
  background: #000;
  border-radius: 3px;
}
上次编辑于:
贡献者: ViewRoom