div+css实现高科技风格按钮悬浮边框动画效果代码

代码语言:html

所属分类:悬停

代码描述:div+css实现高科技风格按钮悬浮边框动画效果代码

代码标签: div css 高科技 风格 按钮 悬浮 边框 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    body {
  margin: 0;
  display: grid;
  place-items: center;
  align-items: center;
  min-height: 100vh;
  background: #000b27;
  font-family: sans-serif;
  text-transform: uppercase;
  font-weight: 600;
}

.btn {
  position: relative;
  display: block;
  color: white;
  padding: 35px 100px;
  text-decoration: none;
  z-index: 1;
}
.btn * {
  pointer-events: none;
}
.btn .bg, .btn .bg::before, .btn .border, .btn .border::before {
  position: absolute;
  clip-path: polygon(0 0, calc(100% - 20px) 0%, 100% 20px, 100% 100%, 20px 100%, 0% calc(100% - 20px));
}
.btn .bg {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: -1;
  background: #fc98ef;
}
.btn .bg::before {
  inset: 2px auto auto 2px;
  background: #7a0a85;
  content: "";
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  box-shadow: inset 0px 0px 10px #F9A5FF;
}
.btn .borderTop::after, .btn .borderTop::before, .btn .borderBottom::after, .btn .borderBottom::before {
  box-shadow: 0px 0px 10px #F9A5FF;
  content: "";
  position: absolute;
  background: #fc98ef;
  height: 2px;
  transition: 0.25s;
}
.btn .borderTop::after, .btn .borderBottom::a.........完整代码请登录后点击上方下载按钮下载查看

网友评论0