gpt4线条流动动画html代码
代码语言:html
所属分类:动画
代码描述:gpt4线条流动动画html代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @property --d-c { syntax: "<number>"; inherits: false; initial-value: 1; } body { background: black; display: grid; place-items: center; align-content: center; min-height: 100vh; font-size: max(20px, 10vw); overflow: hidden; box-sizing: border-box; } .lines { display: grid; gap: 50px; -webkit-box-reflect: bottom; } .row { position: relative; width: 100%; } .track { display: flex; white-space: nowrap; transition: 1s; -webkit-animation: slide calc(var(--d) * var(--d-c, 1)) linear infinite; animation: slide calc(var(--d) * var(--d-c, 1)) linear infinite; } @-webkit-keyframes slide { from { translate: var(--from) 0; } to { translate: var(--to) 0; } } @keyframes slide { from { translate: var(--from) 0; } to { translate: var(--to) 0; } } .line { display: inline-block; height: 10px; background: var(--bg); flex: 1 0 auto; width: calc(1em * var(--w)); margin-right: clamp(30px, 0.5em, 60px); } .row:nth-child(1) { --d: 15s; } .row:nth-child(1):nth-child(odd) { --from: -50%; --to: 0%; } .row:nth-child(1):nth-child(even) { --to: -50%; } .row:nth-child(1) .line:nth-child(7n+1) { --bg: #fff; --w: 2; } .row:nth-child(1) .line:nth-child(7n+2) { --bg: #fff; --w: 1; } .row:nth-child(1) .line:nth-child(7n+3) { --bg: #51da4c; --w: 4; } .row:nth-child(1) .line:nth-child(7n+4) { --bg: #fff; --w: 4; } .row:nth-child(1) .line:nth-child(7n+5) { --bg: #51da4c; --w: 2; } .row:nth-child(1) .line:nth-child(7n+6) { --bg: #fff; --w: 3; } .row:nth-child(1) .line:nth-child(7n+7) { --bg: #fff; --w: 4; } .row:nth-child(2) { --d: 15s; } .row:nth-child(2):nth-child(odd) { --from: -50%; --to: 0%; } .row:nth-child(2):nth-child(even) { --to: -50%; } .row:nth-child(2) .line:nth-child(7n+1) { --bg: #fff; --w: 1; } .row:nth-child(2) .line:nth-child(7n+2) { --bg: #51da4c; --w: 4; } .row:nth-child(2) .line:nth-child(7n+3) { --bg: #fff; --w: 2; } .row:nth-child(2) .line:nth-child(7n+4) { --bg: #fff; --w: 3; } .row:nth-child(2) .line:nth-child(7n+5) { --bg: #51da4c; --w: 4; } .row:nth-child(2) .line:nth-child(7n+6) { --bg: #fff; --w: 4; } .row:nth-child(2) .line:nth-child(7n+7) { --bg: #fff; --w: 1; } .row:nth-child(3) { --d: 10s; } .row:nth-child(3):nth-child(odd) { --from: -50%; --to: 0%; } .row:nth-child(3):nth-child(even) { --to: -50%; } .row:nth-child(3) .line:nth-child(7n+1) { --bg: #51da4c; --w: 2; } .row:nth-child(3) .line:nth-child(7n+2) { --bg: #fff; --w: 1; } .row:nth-child(3) .line:nth-child(7n+3) { --bg: #51da4c; --w: 4; } .row:nth-child(3) .line:nth-child(7n+4) { --bg: #51da4c; --w: 1; } .row:nth-child(3) .line:nth-child(7n+5) { --bg: #fff; --w: 4; } .row:nth-child(3) .line:nth-child(7n+6) { --bg: #51da4c; --w: 2; } .row:nth-child(3) .line:nth-child(7n+7) { --bg: #51da4c; --w: 3; } .row:nth-child(4) { --d: 12.5s; } .row:nth-child(4):nth-child(odd) { --from: -50%; --to: 0%; } .row:nth-child(4):nth-child(even) { --to: -50%; } .row:nth-child(4) .line:nth-child(7n+1) { --bg: #51da4c; --w: 1; } .row:nth-child(4) .line:nth-child(7n+2) { --bg: #51da4c; --w: 1; } .row:nth-child(4) .line:nth-child(7n+3) { --bg: #fff; --w: 1; } .row:nth-child(4) .line:nth-child(7n+4) { --bg: #51da4c; --w: 1; } .row:nth-child(4) .line:nth-child(7n+5) { --bg: #fff; --w: 2; } .row:nth-child(4) .line:nth-child(7n+6) { --bg: #51da4c; --w: 3; } .row:nth-child(4) .line:nth-child(7n+7) { --bg: #fff; --w: 4; } .row:nth-child(5) { --d: 15s; } .row:nth-child(5):nth-child(odd) { --from: -50%; --to: 0%; } .row:nth-child(5):nth-child(even) { --to: -50%; } .row:nth-child(5) .line:nth-child(7n+1) { --bg: #51da4c; --w: 2; } .row:nth-child(5) .line:nth-child(7n+2) { --bg: #fff; --w: 3; } .row:nth-child(5) .line:nth-child(7n+3) { --bg: #fff; --w: 4; } .row:nth-child(5) .line:nth-child(7n+4) { --bg: #fff; --w: 2; } .row:nth-child(5) .line:nth-child(7n+5) { --bg: #51da4c; --w: 2; } .row:nth-child(5) .line:nth-child(7n+6) { --bg: #51da4c; --w: 3; } .row:nth-child(5) .line:nth-child(7n+7) { --bg: #fff; --w: 3; } .row:nth-child(6) { --d: 10s; } .row:nth-child(6):nth-child(odd) { --from: -50%; --to: 0%; } .row:nth-child(6):nth-child(even) { --to: -50%; } .row:nth-child(6) .line:nth-child(7n+1) { --bg: #51da4c; --w: 4; } .row:nth-child(6) .line:nth-child(7n+2) { --bg: #51da4c; --w: 1; } .row:nth-child(6) .line:nth-child(7n+3) { --bg: #fff; --w: 3; } .row:nth-child(6) .line:nth-child(7n+4) { --bg: #fff; --w: 1; } .row:nth-child(6) .line:nth-child(7n+5) { --bg: #fff; --w: 3; } .row:nth-child(6) .line:nth-child(7n+6) { --bg: #51da4c; --w: 2; } .row:nth-child(6) .line:nth-child(7n+7) { --bg: #fff; --w: 2; } </style> </head> <b.........完整代码请登录后点击上方下载按钮下载查看
网友评论0