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=Niconne&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: grid;
  font-family: "Niconne", cursive;
  font-size: 6vmin;
  place-items: center;
  height: 100vh;
  perspective: 600px;
  background-color: #4ff59f;
  overflow: hidden;
  --fill-height: 15vmin;
}
body .gal-btn {
  overflow: hidden;
  padding: 7px 0;
}
body .gal-btn .btn__graphic {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  fill: #00c170;
  stroke: #00c170;
  stroke-width: 1px;
}
body .gal-btn .btn__graphic--slide {
  top: 4vmin;
  stroke-width: 4vmin;
  transition-timing-function: cubic-bezier(0, 0.25, 0.5, 1);
  transition: transform 1.2s ease-in-out;
}
body .gal-btn .sea {
  background: #00c170;
  width: 100%;
  height: 10px;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: -1;
  transition: height 1.2s ease-in-out;
}
body .gal-btn:hover .sea {
  height: calc(var(--fill-height) + 6px);
}
body .gal-btn:hover .btn__graphic--slide {
  transform: rotatex(30deg) translateZ(var(--fill-height)) translate3d(-66.6%, 0, 0);
}
body .gal-btn .btn-text {
  position: absolute;
  color: black;
  top: 50%;
  left: 50%;
  transition: all 0.8s ease-in-out;
  -webkit-tran.........完整代码请登录后点击上方下载按钮下载查看

网友评论0