webgl实现流体液态动画效果代码
代码语言:html
所属分类:动画
代码描述:webgl实现流体液态动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body { margin: 0; touch-action: none; overflow: hidden; display: grid; user-select: none; } canvas { width: 100%; height: auto; object-fit: contain; } body > * { grid-row: 1; grid-column: 1; } main { display: grid; } main > * { grid-row: 1; grid-column: 1; } article { position: relative; align-self: center; justify-self: center; width: 18ch; font: bold 20px/1 system-ui; color: #b5b5b5; text-rendering: optimizeLegibility; } article > h2 { font-size: 2em; opacity: 0; animation: fade-in 10s forwards 0s; margin: 0; line-height: 1.6; } article > p { opacity: 0; animation: fade-in 10s forwards 4s; margin: 0; line-height: 1.2; } article > p::before { opacity: 0; animation: fade-in 10s forwards 8s; } article > p::after { opacity: 0; animation: fade-in 10s forwards 8s; } article:nth-of-type(2) { margin-left: 5ch; text-align: right; } article:nth-of-type(3) { margin-left: 15ch; } article:nth-of-type(3) > h2 { text-align: center; line-height: 100%; margin: 0; } article:nth-of-type(3) > p { position: relative; font-size: 60px; line-height: 100%; margin: 0; color: #c51; } @media screen and (min-width: 600px) { article:nth-of-type(3) > p::before { content: ""; position: absolute; height: 100vh; width: 100vw; border-top: 2px solid transparent; border-left: 2px solid transparent; border-image: linear-gradient(315deg, #b5b5b5, transpa.........完整代码请登录后点击上方下载按钮下载查看
网友评论0