css实现加载动画
代码语言:html
所属分类:加载滚动
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> -CSS push pop loaders ⏳</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> body { --primary: #fff; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #663399; } *, *:after, *:before { box-sizing: border-box; } .loader { margin: 50px; } /** * push-pop * lil push pop effect, push one side out and one side in * @author jh3y */ .push-pop { --duration: .85; height: 100px; width: 100px; position: relative; overflow: hidden; } .push-pop > div:nth-of-type(1) { height: 20px; width: 20px; position: absolute; -webkit-animation: push-pop-slide calc(var(--duration) * 1s) infinite alternate ease-in-out; animation: push-pop-slide calc(var(--duration) * 1s) infinite alternate ease-in-out; -webkit-transform: translate(0, -100%); transform: translate(0, -100%); top: 100%; left: 0; } .push-pop > div:nth-of-type(1):after { -webkit-animation: push-pop-flip calc(var(--duration) * 1s) infinite alternate ease-in-out; animation: push-pop-flip calc(var(--duration) * 1s) infinite alternate ease-in-out; background: var(--primary); content: '&.........完整代码请登录后点击上方下载按钮下载查看
网友评论0