gsap实现碎片化动画效果代码
代码语言:html
所属分类:动画
代码描述:gsap实现碎片化动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } body { background: #16222A; background: linear-gradient(0deg, #3A6073, #16222A); overflow: hidden; } body, html { height: 100%; width: 100%; margin: 0; padding: 0; } .container { display: flex; align-items: center; justify-content: center; height: 100%; margin: auto; perspective: 600px; } .grid { display: grid; width: 50%; transform: rotateX(75deg); transform-style: preserve-3d; } .cell { position: relative; background: white; } .cell:before { padding-top: 100%; content: ""; display: block; } .gsap-3-logo { width: 20vw; max-width: 150px; position: fixed; bottom: 15px; right: 15px; } /* ========================================================== Collection Linl ========================================================== */ .collection { position: fixed; z-index: 1000; top: 24px; right: 24px; display: flex; flex-direction: column; } .collection__link { position: relative; margin-bottom: 16px; color: white; font-family: Helvetica, sans-serif; text-decoration: none; font-size: 16px; } .collection__link span { display: block; position: absolute; bottom: -3px; left: 0; height: 1px; width: 10%; background-color: white; content: ""; transition: width 0.3s; } .collection__link:hover span { width: 100%; } </style> </head> <body> <div class="con.........完整代码请登录后点击上方下载按钮下载查看
网友评论0