css+svg实现button按钮loading加载动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:css+svg实现button按钮loading加载动画效果代码
代码标签: css svg button 按钮 loading 加载 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" /> <style> body{ background: #212121; padding: 100px; } button { color: white; background-color: #1D4ED8; --ring-color: #93C5FD; font-weight: 500; border-radius: 0.5rem; font-size: 1rem; line-height: 2rem; padding-left: 2rem; padding-right: 2rem; padding-top: 0.7rem; padding-bottom: 0.7rem; text-align: center; margin-right: 0.5rem; display: inline-flex; align-items: center; border: none; } button:hover { background-color: #1E40AF; } button:focus { box-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); } button svg { display: inline; width: 1.3rem; height: 1.3rem; margin-right: 0.75rem; color: white; animation: spin_357 1s linear infinite; } @keyframes spin_357 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } </style> </head> <body> <button disabled="" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-b.........完整代码请登录后点击上方下载按钮下载查看
网友评论0