trigjs实现滚动动画效果代码
代码语言:html
所属分类:动画
代码描述:trigjs实现滚动动画效果代码,滚动鼠标滚轮试试。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { margin: 0px; padding: 0px; background-color: #333; color: #fff; font-family: "Space Mono", monospace; } a { color: #fff; } h1 { font-family: "Bebas Neue", cursive; color: #fff; text-shadow: 2px 2px 2px #000000; font-size: 72px; } .pageContainer { max-width: 100%; width: 100%; } .container { width: 80vw; min-height: 100vh; position: relative; margin: auto; display: flex; align-items: center; justify-content: center; flex-direction: column; } .pinContainer { width: 80vw; min-height: 400vh; position: relative; margin: auto; display: flex; align-items: center; flex-direction: column; } .pinned { display: inline-block; position: sticky; top: 30%; } .move { transform: translateX(calc(var(--trig-px) - 10px)); transition: transform ease-out 0.3s; display: inline-block; } #title { position: relative; } #title:after { content: ""; position: absolute; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0