gsap实现文字导航条点击下划线动画效果代码
代码语言:html
所属分类:菜单导航
代码描述:gsap实现文字导航条点击下划线动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
html,
body {
height: 100%;
}
body {
background-color: #040a1a;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
nav {
display: flex;
flex-wrap: wrap;
}
nav a {
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-family: "ff-chambers-sans-web", sans-serif;
font-weight: 500;
font-size: 2.5rem;
text-decoration: none;
text-transform: uppercase;
position: relative;
margin: 1rem 0.5rem;
padding: 0.7rem 2.5rem;
transition: color 500ms ease;
}
nav a span {
display: flex;
align-items: center;
justify-content: center;
z-index: 1;
}
nav a svg {
position: absolute;
bottom: 0;
left: 0;
transform: skew(-30deg);
transition: box-shadow 25ms 25ms;
}
nav a svg rect {
shape-rendering: crispEdges;
z-index: 0;
}
nav a svg .blue rect {
fill: #05eafa;
mix-blend-mode: color-dodge;
}
nav a svg .pink rect {
fill: #ff6bd3;
}
nav a.active svg {
box-shadow: 0 0 15px 3px #2b8eff;
}
@media (max-width: 1100px) {
nav {
flex-direction: column;
}
nav a svg {
transition: no.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0