gsap+svg实现水中浮出菜单动画效果代码
代码语言:html
所属分类:菜单导航
代码描述:gsap+svg实现水中浮出菜单动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
#tabbar {
--background: #fff;
--shadow: rgba(0, 0, 0, 0.2);
--menu-icon: #BBC1E1;
--menu-icon-move: 0;
--menu-icon-rotate: 0;
--menu-icon-add: #275EFE;
--menu-icon-add-opacity: 0;
--menu-icon-add-background: rgba(39, 94, 254, 0.08);
--options-icon: #404660;
--options-y: 16;
--options-middle-y: 16;
--options-opacity: 0;
margin-top: 10%;
position: relative;
-webkit-tap-highlight-color: transparent;
}
#tabbar.gooey {
filter: url(#goo);
}
#tabbar:before {
content: "";
display: block;
height: 760px;
position: absolute;
left: -4px;
right: -4px;
bottom: -4px;
border-radius: 60px;
background: rgba(255, 255, 255, 0.05);
}
#tabbar ul {
margin: 0;
padding: 0;
list-style: none;
position: absolute;
left: var(--list-spacing-h, 60px);
right: var(--list-spacing-h, 60px);
top: var(--list-spacing-top, 0);
display: flex;
justify-content: space-between;
align-items: center;
}
#tabbar ul li {
transform: translate(calc(var(--x, 0) * var(--x-change, 1px)), calc(var(--y, 0) * var(--x-change, 1px))) translateZ(0);
}
#tabbar ul li button {
display: block;
padding: 0;
margin: 0;
outline: none;
background: none;
border: none;
-webkit-appearance: none;
}
#tabbar ul.options {
--svg-size: 16px;
--svg-fill: var(--options-icon);
}
#tabbar ul.options li {
--y: var(--options-y);
}
#tabbar ul.options li button {
display: flex;
justify-content: center;
align-items: center;
width: var(--size, 52px);
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0