四种loading加载动画效果
代码语言:html
所属分类:加载滚动
代码描述:四种loading加载动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> /* ***** Colors - Start ***** */ /* ***** Colors - End ***** */ /* ***** Dimensions - Start ***** */ /* ***** Dimensions - End ***** */ /* ***** Global Styles - Start ***** */ * { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: #111; } .loader-2 .shape-1, .loader-3 .shape-1, .loader-2 .shape-2, .loader-3 .shape-2, .loader-2 .shape-3, .loader-3 .shape-3 { display: flex; justify-content: center; align-items: center; } .loader-1 .shape-1, .loader-1 .shape-2, .loader-1 .shape-3 { width: 25px; height: 10px; border-radius: 20px; margin-right: 25px; } .loader-1 .shape-1:first-child, .loader-1 .shape-2:first-child, .loader-1 .shape-3:first-child { margin-right: 0; } .loader-1 .shape-1:last-child, .loader-1 .shape-2:last-child, .loader-1 .shape-3:last-child { margin-right: 0; } .loader-2 .shape-1, .loader-3 .shape-1, .loader-2 .shape-2, .loader-3 .shape-2, .loader-2 .shape-3, .loader-3 .shape-3 { width: 40px; height: 40px; border-radius: 50%; margin: 5px 5px 0 0; } .loader-4 .line-1, .loader-4 .line-2, .loader-4 .line-3 { width: 50px; height: 10px; border-radius: 20px; margin-bottom: 12px; } .loader-4 .line-1:last-child, .loader-4 .line-2:last-child, .loader-4 .line-3:last-child { margin-bottom: 0; } .loader-2, .loader-3 { display: flex; flex-direction: column; align-items: center; } .loader-2 .shape-1, .loader-3 .shape-1 { background-color: #f5e82f; } .loader-2 .shape-2, .loader-3 .shape-2 { background-color: #a6e630; margin-right: 0; } .loader-2 .shape-3, .loader-3 .shape-3 { background-color: #4cb8f5; margin: 0; } /* ***** Global Styles - End ***** */ /* ***** Specific Styles - Start ***** */ .container { display: grid; place-items: center; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); height: 100vh; } .shape-wrapper { display: flex; } .loader-1 { display: flex; } .loader-1 .shape-1 { background-color: #f5e82f; } .loader-1 .shape-2 { background-color: #a6e630; } .loader-1 .shape-3 { background-color: #4cb8f5; } .loader-2 .shape-3 { width: 75px; margin-left: 5px; border-radius: 50% 50% 50% 50%/0% 0% 100% 100%; } .loader-4 .line-1 { width: calc(50px - 10px); background-color: #f5e82f; } .loader-4 .line-2 { background-color: #a6e630; } .loader-4 .line-3 { width: calc(50px / 2); background-color: #4cb8f5; } /* ***** Specific Styles - End ***** */ </style> </head> <body translate="no"> <div class="container"> <div class="loader-1"> <div class="shape-1"></div> <div class="shape-2"></div> <div class="shape-3"></div> </div> <div class="loader-2"> <div class="shape-wrapper"> <div class="shape-1">&.........完整代码请登录后点击上方下载按钮下载查看
网友评论0