css实现悬浮发光按钮效果代码

代码语言:html

所属分类:悬停

代码描述:css实现悬浮发光按钮效果代码

代码标签: css 悬浮 发光 按钮

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


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
<style>
@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@700&display=swap&text=HOVER%20ME");
button {
  all: unset;
  color: #712f9d;
  font: 700 1.125rem/1.2 Raleway, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.85em;
  max-width: 100%;
  width: 12em;
  background: inherit;
  background-clip: padding-box;
  border: 5px solid #712f9d;
  border-radius: 2em;
  cursor: pointer;
  position: relative;
  transition: 0.25s ease-out;
}
button::before, button::after {
  content: "";
  border-radius: inherit;
  transition: inherit;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
button::before {
  inset: -0.2em;
  z-index: -1;
  background: linear-gradient(#fff26f, #a80cf1);
  filter: blur(1.2em);
  transform-origin: bott.........完整代码请登录后点击上方下载按钮下载查看

网友评论0