css实现按钮悬浮闪烁动画效果代码

代码语言:html

所属分类:悬停

代码描述:css实现按钮悬浮闪烁动画效果代码

代码标签: css 按钮 悬浮 闪烁 动画

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

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

<head>
  <meta charset="UTF-8">
  

  
  
<style>
* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

div {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-size: 100% 100%;
  background-position: 0px 0px, 0px 0px, 0px 0px, 0px 0px, 0px 0px;
  background-image: radial-gradient(49% 81% at 45% 47%, #03FF6D45 0%, #073AFF00 100%), radial-gradient(113% 91% at 17% -2%, #F8DDD4 1%, #FF000000 99%), radial-gradient(142% 91% at 83% 7%, #FAE5F4 1%, #FF000000 99%), radial-gradient(142% 91% at -6% 74%, #71CEEBFF 0%, #FF000000 99%), radial-gradient(142% 91% at 111% 84%, #E583B9 0%, #AC23D7FF 100%);
}

h1 {
  font-family: system-ui;
  font-weight: 800;
  margin: 0;
  line-height: 1;
  font-size: 5.4vw;
}

@property --start-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes rotateTo {
  to {
    --start-angle: 18deg;
  }
}
@keyframes rotateBack {
  from {
    --start-angle: 18deg;
  }
  to {
    --start-angle: 0deg;
  }
}
button {
  display: inline-block;
  position: relative;
  appearance: none;
  border: none;
  outline: none;
  padding: 1.33vw 1.66vw;
  text-rendering: geometricPrecision;
  font-family: system-ui;
  font-smooth: always;
  font-weight: 600;
  font-size: 1.8vw;.........完整代码请登录后点击上方下载按钮下载查看

网友评论0