炫酷悬浮文字弯曲按钮特效

代码语言:html

所属分类:悬停

代码描述:炫酷悬浮文字弯曲按钮特效

代码标签: 弯曲 按钮 特效

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
body {
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: center;
          justify-content: center;
  -webkit-box-align: center;
          align-items: center;
  height: 100vh;
  overflow: hidden;
  background: -webkit-gradient(linear, left top, left bottom, from(#aaffa9), to(#11ffbd));
  background: linear-gradient(to bottom, #aaffa9, #11ffbd);
  font-family: "Helvetica Neue", Helvetica, sans-serif;
}
body div {
  width: 180px;
  height: 50px;
  position: absolute;
  cursor: pointer;
  margin-top: 40px;
}
body div:nth-of-type(2) {
  margin-top: -40px;
  -webkit-transform: scaleY(-1);
          transform: scaleY(-1);
}
body div:nth-of-type(2):hover b span .char {
  offset-distance: calc((var(--char-index) * 7.5%) + 35%);
}
body div:nth-of-type(2) b span .char {
  -webkit-transform: scaleY(-1);
          transform: scaleY(-1);
  offset-distance: calc((var(--char-index) * 10%) + 32.5%);
}
body div:before {
  content: '';
  -webkit-transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: absolute;
  width: 100%;
  height: 100%;
  box-shadow: 0 -20px .........完整代码请登录后点击上方下载按钮下载查看

网友评论0