gsap实现一个购买衣服下订单开炮弹射动画效果代码
代码语言:html
所属分类:动画
代码描述:gsap实现一个购买衣服下订单开炮弹射动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; } body { min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; } :root { --color: hsl(var(--hue), 80%, 60%); } .t-shirt { height: 100%; width: 100%; position: absolute; top: 0; left: 0; } .t-shirt__shirt { fill: var(--color); } .t-shirt__wrapper { position: relative; } .t-shirt__cannon { position: absolute; left: 50%; top: 50%; width: 10px; transform: translate(-50%, 0); } .t-shirt__cannon svg { position: absolute; top: 0; left: 0; } .cannon__shirt path { fill: var(--color); } .cannon__band { fill: #ffd500; } .cannon__plastic { fill: rgba(163,231,245,0.35); } .cannon__shine { fill: rgba(255,255,255,0.5); } .button { font-family: sans-serif; font-weight: bold; font-size: 1rem; padding: 1rem 2rem; padding-left: calc(1rem + 50px); position: relative; border-radius: 6px; border: 0; color: #fff; outline: transparent; min-width: 120px; -webkit-clip-path: inset(-1000% -1000% 0 0); clip-path: inset(-1000% -1000% 0 0); } .button__text { position: relative; } .button__text .dummy { color: transparent; } .button__text > .text { position: absolute; top: 0; left: 0; white-space: nowrap; } .button .word { display: inline-block; -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); } .button .char { display: inline-block; } .button__shirt { .........完整代码请登录后点击上方下载按钮下载查看
网友评论0