gsap实现跳跃式动画导航效果

代码语言:html

所属分类:菜单导航

代码描述:gsap实现跳跃式动画导航效果,配合插件MotionPathPlugin

代码标签: 动画 导航 效果

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

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

<style>
body {
  font-family: "proxima-nova", sans-serif;
  color: white;
  display: flex;
  height: 100vh;
  background: #111;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  background-image: linear-gradient(
    0deg,
    #382B8C,
    #746BB0
  );  
}
#demo {
  width: 90vw;
  height: auto;
  max-width: 720px;
  overflow: visible;
}
#icons path {
  
  fill: white;
}

text {
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  fill: rgba(0,0,0,0.5);
}

#icons g {
 cursor: pointer;
 
}

#icons rect {
  fill: transparent;
}

.goop {
  fill: #1C4861;
  fill: #5C51A6;
  fill: #382B8C;
}

#main {
  stroke: #00688e;
  stroke: none;
  stroke-width: 1px;
}



h1, h2,
p {
  margin: 0;

}

a {
  background: #5cceee;
  color: white;
  padding: 10px;
  text-decoration: none;
  border-radius: 3px;
  margin-top: 10px;
}

a:hover {
  background: white;
    color: #5cceee;
}
h1, h2,
p {
  margin: 0;
}
h2 {
  font-weight: 400;
}
h2 span {
  font-weight: 700;
  color: #5cceee;
}
p span {
  font-weight: 700;
  color: #5cceee;
}

.branding {

  display: flex;
  flex-direction: column;
 align-items: center;
/*   position: absolute;
  bottom: 1rem; */
}
</style>

</head>
<body translate="no">
<h1>Jumping Gooey Nav</h1>
<p>smooth & gooey goodness</p>
<svg id="demo" xmlns="http://www.w3.org/2000/svg" width="600" height="200" viewBox="0 0 600 200">
<defs>
<filter id="gooFilter">
<fegaussianblur in="SourceGraphic" stdDeviation="10" result="blur" />
<fecolormatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0