webgl+gsap实现顶部水滴滴下滚动页面代码动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:webgl+gsap实现顶部水滴滴下滚动页面代码动画效果代码
代码标签: webgl gsap 顶部 水滴 滴下 滚动 页面 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body, html {
margin: 0;
padding: 0;
font-family: sans-serif;
font-size: 20px;
}
a {
color: inherit;
}
.page {
width: 100%;
min-height: 1500px;
display: flex;
flex-direction: column;
align-items: center;
opacity: 0;
}
.page ::-moz-selection {
background: #F7C02D;
}
.page ::selection {
background: #F7C02D;
}
.text-overlay,
.scroll-msg {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.scroll-msg {
margin-top: 2em;
pointer-events: none;
}
.scroll-msg > div:nth-child(1) {
margin-top: -10vh;
padding-bottom: 1em;
text-transform: uppercase;
font-size: 2em;
}
.text-overlay {
position: fixed;
top: 0;
left: 0;
opacity: 0;
}
canvas#gooey-overlay {
position: fixed;
top: 0;
left: 0;
display: block;
width: 100%;
pointer-events: none;
}
.arrow-animated {
font-size: 1em;
animation: arrow-float 1s infinite;
}
@keyframes arrow-float {
0% {
transform: translateY(0);
animation-timing-function: ease-out;
}
60% {
transform: translateY(50%);
animation-timing-function: ease-in-out;
}
100% {
transform: translateY(0);
animation-timing-function: ease-out;
}
}
.lil-gui {
--width: 350px;
max-width: 90%;
--widget-height: 20px;
font-size: 15px;
--input-font-size: 15px;
--padding: 10px;
--spacing: 10px;
--slider-knob-width: 5px;
--background-color: rgba(5, 0, 15, .8);
--widget-color: rgba(255, 255, 255, .3);
--focus-color: rgba(255, 255, 255, .4);
--hover-color: rgba(255, 255, 255, .5);
--font-family: monospace;
}
.lil-gui.autoPlace {
z-index: 1;
}
</style>
</head>
<body translate="no">
<div class="page">
<div class="scroll-msg">
<div>Hello </div>
<div>scroll me</div>
<div class="arrow-animated-wrapper">
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0