react实现文字无限循环滚动动画效果代码
代码语言:html
所属分类:动画
代码描述:react实现文字无限循环滚动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet"> <style> body { font-family: "Montserrat", sans-serif; background: #1e293b; color: #f8fafc; } .app { width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; } header { display: flex; flex-direction: column; align-items: center; margin: 0 1rem 1rem; text-align: center; } header h1 { font-weight: 600; font-size: 3rem; margin-bottom: 0.5rem; } header p { color: #94a3b8; } .tag-list { width: 30rem; max-width: 90vw; display: flex; flex-direction: column; gap: 1rem 0; position: relative; padding: 1rem 0; overflow: hidden; } .loop-slider .inner { display: flex; width: fit-content; animation-name: loop; animation-timing-function: linear; animation-iteration-count: infinite; animation-direction: var(--direction); animation-duration: var(--duration); } .tag { display: flex; align-items: center; gap: 0 0.2rem; color: #e2e8f0; font-size: 0.9rem; background-color: #334155; border-radius: 0.4rem; padding: 0.7rem 1rem; margin-right: 1rem; box-shadow: 0 0.1rem .........完整代码请登录后点击上方下载按钮下载查看
网友评论0