有时我们在开发项目需要等待加载完毕后再显示数据,我们可以给它加个loading动画,以下是收藏的一个动画效果供大家参考和使用
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>loading</title> </head> <style> .loading__anim { width: 35px; height: 35px; display: inline-block; border: 5px solid rgba(189,189,189 ,0.25); border-left-color: rgba(3,155,229 ,1); border-top-color: rgba(3,155,229 ,1); border-radius: 50%; animation: rotate 600ms infinite linear; } @keyframes rotate { to { transform: rotate(1turn) } } </style> <body> <div style="position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);"> <div class="loading__anim"></div> </div> </body> </html>
文章评论(0)