gsap实现鼠标滚动视觉前进后退差异效果代码
代码语言:html
所属分类:视觉差异
代码描述:gsap实现鼠标滚动视觉前进后退差异效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> .layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; } .frame { position: absolute; top: 20px; left: 20px; width: calc(100% - 40px); height: calc(100% - 40px); border: 3px solid #fff; box-sizing: border-box; border-radius: 6px; } .bg { position: absolute; width: 100%; height: 100%; background: url(//repo.bfw.wiki/bfwrepo/image/5e1c022531682.png) center center no-repeat; background-size: cover; } .text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 12px; line-height: 1.2; } .deco1 { position: absolute; top: 30%; left: 25%; width: 7vw; height: 7vw; border-radius: 100%; background: #fff; } .deco2 { position: absolute; top: 40%; left: 65%; width: 7vw; height: 7vw; border-radius: 100%; background: #fff; } .deco3 { position: absolute; top: 60%; left: 35%; width: 7vw; height: 7vw; border-radius: 100%; background: #fff; } </style> </head> <body translate="no"> <div class="layer -bg"> <div class="bg"></div> </div> <div class="layer -frame"> <div class="frame"></div> </div> <div class="layer -text"> <d class="text"> <h1>Hello World!<br>I'm Yusuke.<br>I love WebDev!</h1> </div> </div> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0