css实现鼠标悬停按钮光滑填充底色动画效果代码

代码语言:html

所属分类:悬停

代码描述:css实现鼠标悬停按钮光滑填充底色动画效果代码

代码标签: 悬停 按钮 光滑 填充 底色 动画 效果

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


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

<head>

  <meta charset="UTF-8">

  

  
  
<style>
.button {
  position: relative;
  padding: 24px 64px;
  border-radius: 100vw;
  background-color: transparent;
  font-family: "Playfair Display", serif;
  color: #fafafa;
  border: solid 1px rgba(250, 250, 250, 0.3);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.button .button-text {
  position: relative;
  z-index: 2;
}
.button .fill-container {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  padding-bottom: 100%;
  transform: translateY(-50%) rotate(180deg);
}
.button .fill-container::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: blue;
  border-radius: 50%;
  transition: all .........完整代码请登录后点击上方下载按钮下载查看

网友评论0