gsap实现鼠标滚动图片依次展开动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:gsap实现鼠标滚动图片依次展开动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> .notification { font-size: 0.9rem; font-family: termina, sans-serif; position: absolute; left: 10%; top: 10%; width: 200px; height: 200px; border-radius: 50%; background: #b6916d; color: #3c564f; display: flex; justify-content: center; align-items: center; z-index: 9; font-weight: 700; text-align: center; padding: 20px; } .notification:hover { background: #bcb8ad; } .container { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; width: 100%; position: relative; } .container:nth-child(1) { background: #3c564f; } .container:nth-child(2) { background: #b69187; } .container:nth-child(3) { background: #bcb8ad; } .container:nth-child(4) { background: #b6916d; } img { height: 100%; width: 100%; object-fit: cover; } .reveal { visibility: hidden; position: relative; width: 60%; height: 60%; } * { margin: 0; padding: 0; box-sizing: border-box; } </style> </head> <body > <div class='container'> <div class='reveal'> <img src='//repo.bfw.wiki/bfwrepo/image/5e62ef20b92ee.png'> </div> </div> <div class='container'> <div class='reveal'> <img src='//repo.bfw.wiki/bfwrepo/image/5e62ef20b92ee.png'> </div> </div> <div.........完整代码请登录后点击上方下载按钮下载查看
网友评论0