css+js实现小树跳动带文字滚动loading加载动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:css+js实现小树跳动带文字滚动loading加载动画效果代码
代码标签: css 小树 跳动 文字 滚动 loading 加载 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> path { animation: bounce 0.8s infinite; transform-origin: bottom; } #tree1 { animation-delay: 0.15s; } #tree2 { animation-delay: 0.3s; } #tree3 { animation-delay: 0.45s; } #tree4 { animation-delay: 0.6s; } @keyframes bounce { 0% { transform: scaleY(1); } 10% { transform: scaleY(1.2); } 30% { transform: scaleY(0.9); } 40% { transform: scaleY(1); } } body { text-align: center; background: #f0f0eb; display: flex; flex-direction: column; height: 100vh; margin: 0; align-items: center; justify-content: center; } #messages { font-family: sans-serif; display: flex; width: 400px; overflow: hidden; position: relative; height: 1.5em; margin-top: -20px; color: #275243; font-size: 20px; } #messages p { white-space: nowrap; margin: 0; line-height: 1.5; min-width: 400px; text-align: center; position: absolute; right: 200%; transition: right 1s ease-in-out; } #messages p:last-child { right: -200%; } #messages p:nth-last-child(2) { right: 0; } </style> </head> <body> <div id="loader"> <svg width="100" height="134" viewbox="0 0 147 134" fill="none" xmlns="http://www.w3.org/2000/svg"> <path id="tree1" d="M32.299 85.543a.068.068 0 0 1-.068-.068.069.069 0 0 1 .068-.068c1.918-.357 9.027-2.219 7.11-9.98-2.086-8.446-9.517-5.57-11.244-4.772a.067.067 0 0 1-.083-.022.069.069 0 0 1 .005-.086c.878-.946 3.394-4.151 1.596-8.234-1.167-2.652-4.011-6.82-10.47-4.886-11.085 3.323-5.825 11.952-4.64 13.674a.069.069 0 0 1-.046.105.068.068 0 0 1-.044-.008c-1.666-1.061-8.375-3.91-10.924 2.885-1.983 5.284 2.262 8.146 3.025 8.662a.067.067 0 0 1 .029.072.068.068 0 0 1-.056.052c-.939.147-4.767 1.728-5.368 5.197-.33 1.906.317 4.382 2.95 7.502 3.659 4.335 12.5.339 13.602-.37a.068.068 0 0 1 .068-.002.067.067 0 0 1 .037.057c.17 4..........完整代码请登录后点击上方下载按钮下载查看
网友评论0