css+div实现15款不同的loading加载动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:css+div实现15款不同的loading加载动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html lang="en"> <head> <meta charset="UTF-8"> <style> *,*:before,*:after { box-sizing: border-box; margin: 0; padding: 0 } body { background: black } .container { text-align: center } section { width: 20%; display: inline-block; text-align: center; min-height: 215px; vertical-align: top; margin: 1%; background: #080915; border-radius: 5px; box-shadow: 0 0 30px 1px #103136 inset } @media only screen and (max-width: 600px) { section { min-width:350px } } .loader { position: relative; width: 60px; height: 60px; border-radius: 50%; margin: 75px; display: inline-block; vertical-align: middle } .loader-star { position: absolute; top: calc(50% - 12px) } .loader-1 .loader-outter { position: absolute; border: 4px solid #f50057; border-left-color: transparent; border-bottom: 0; width: 100%; height: 100%; border-radius: 50%; -webkit-animation: loader-1-outter 1s cubic-bezier(.42,.61,.58,.41) infinite; animation: loader-1-outter 1s cubic-bezier(.42,.61,.58,.41) infinite } .loader-1 .loader-inner { position: absolute; border: 4px solid #f50057; border-radius: 50%; width: 40px; height: 40px; left: calc(50% - 20px); top: calc(50% - 20px); border-right: 0; border-top-color: transparent; -webkit-animation: loader-1-inner 1s cubic-bezier(.42,.61,.58,.41) infinite; animation: loader-1-inner 1s cubic-bezier(.42,.61,.58,.41) infinite } .loader-2 .loader-star { position: static; width: 60px; height: 60px; transform: scale(0.7); -webkit-animation: loader-2-star 1s ease alternate infinite; animation: loader-2-star 1s ease alternate infinite } .loader-2 .loader-circles { width: 8px; height: 8px; background: #18ffff; border-radius: 50%; position: absolute; left: calc(50% - 4px); top: calc(50% - 4px); transition: all 1s ease; -webkit-animation: loader-2-circles 1s ease-in-out alternate infinite; animation: loader-2-circles 1s ease-in-out alternate infinite } .loader-3 .dot { width: 10px; height: 10px; background: #00e676; border-radius: 50%; position: absolute; top: calc(50% - 5px) } .loader-3 .dot1 { left: 0; -webkit-animation: dot-jump .5s cubic-bezier(0.77,0.47,0.64,0.28) alternate infinite; animation: dot-jump .5s cubic-bezier(0.77,0.47,0.64,0.28) alternate infinite } .loader-3 .dot2 { left: 20px; -webkit-animation: dot-jump .5s .2s cubic-bezier(0.77,0.47,0.64,0.28) alternate infinite; animation: dot-jump .5s .2s cubic-bezier(0.77,0.47,0.64,0.28) alternate infinite } .loader-3 .dot3 { left: 40px; -webkit-animation: dot-jump .5s .4s cubic-bezier(0.77,0.47,0.64,0.28) alternate infinite; animation: dot-jump .5s .4s cubic-bezier(0.77,0.47,0.64,0.28) alternate infinite } .loader-4 { border: 7px double #ff5722; -webkit-animation: ball-turn 1s linear infinite; animation: ball-turn 1s linear infinite } .loader-4:before,.loader-4:after { content: ""; position: absolute; width: 12px; height: 12px; background: #ff5722; border-radius: 50%; bottom: 0; right: 37px } .loader-4:after { left: 37px; top: 0 } .loader-5 { border: 8px dotted rgba(255,255,0,1); transition: all 1s ease; -webkit-animation: dotted-spin 1s linear infinite; animation: dotted-spin 1s linear infinite; border-bottom-width: 1px; border-bottom-color: rgba(255,255,0,0.3); border-left-width: 2px; border-left-color: rgba(255,255,0,0.5); border-top-width: 3px; border-right-width: 4px; border-top-color: rgba(255,255,0,0.7) } .loader-5 .loader-pacman,.loader-pacman { position: absolute; top: 40px; left: 25px; width: 0; height: 0; border-right: 12px solid transparent; border-top: 12px solid rgba(255,255,0,1); border-left: 12px solid rgba(255,255,0,1); border-bottom: 12px solid rgba(255,255,0,1); border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px } .loader-6 { border: 6px groove #7e57c2; transform: rotate(360deg); transition: all 1s ease; -webkit-animation: loader-1-inner 1s ease-out alternate infinite; animation: loader-1-inner 1s ease-out alternate infinite } .loader-6 .loader-inner { border: 0 inset #9575cd; border-radius: 50%; width: 100%; height: 100%; -webkit-animation: border-zoom 1s ease-out alternate infinite; animation: border-zoom 1s ease-out alternate infinite } .loader-7 .line { width: 8px; position: absolute; border-radius: 5px; bottom: 0; background: linear-gradient(to bottom,#1ee95d,#5714ce) } .loader-7 .line1 { left: 0; -webkit-animation: line-grow .5s ease alternate infinite; animation: line-grow .5s ease alternate infinite } .loader-7 .line2 { left: 20px; -webkit-animation: line-grow .5s .2s ease alternate infinite; animation: line-grow .5s .2s ease alternate infinite } .loader-7 .line3 { left: 40px; -webkit-animation: line-grow .5s .4s ease alternate infinite; animation: line-grow .5s .4s ease alternate infinite } .loader-8 .star1 { -webkit-animation: star-jump .5s ease-out alternate infinite; animation: star-jump .5s ease-out alternate infinite } .loader-8 .star2 { -webkit-animation: star-jump .5s .25s ease-out alternate infinite; animation: star-jump .5s .25s ease-out alternate infinite } .loader-8 .star3 { -webkit-animation: star-jump .5s .5s ease-out alternate infinite; animation: star-jump .5s .5s ease-out alternate infinite } .loader-8 .loader-star { transform: scale3d(0.7,0.7,0.7) } .loader-8 .star1 { left: 0 } .loader-8 .star2 { left: 25px } .loader-8 .star3 { left: 50px } .loader-9 .star1 { -webkit-animation: stars-pulse 1s ease-in-out infinite; animation: stars-pulse 1s ease-in-out infinite; left: 0 } .loader-9 .star2 { -webkit-animation: stars-pulse 1s .2s ease-in-out infinite; animation: stars-pulse 1s .2s ease-in-out infinite; left: 25px } .loader-9 .star3 { -webkit-animation: stars-pulse 1s .4s ease-in-out infinite; animation: stars-pulse 1s .4s ease-in-out infinite; left: 50px } .loader-10 { width: auto; height: auto; -webkit-animation: star-pulse 2s ease-in-out infinite; animation: star-pulse 2s ease-in-out infinite } .loader-10 .loader-star { position: static } .loader-11 { -webkit-animation: stars-rotate 2s linear infinite; animation: stars-rotate 2s linear infinite } .loader-11 .loader-star { position: absolute } .loader-11 .star1 { top: 0; left: -7px } .loader-11 .star2 { left: 8px; top: -12px; position: absolute; transform: scale(0.8); opacity: .9 } .loader-11 .star3 { left: 26px; top: -11px; position: absolute; transform: scale(0.7); opacity: .8 } .loader-11 .star4 { left: 39px; top: -2px; position: absolute; transform: scale(0.6); opacity: .7 } .loader-11 .star5 { left: 44px; top: 10px; position: absolute; transform: scale(0.5); opacity: .6 } .loader-11 .star6 { left: 45px; top: 21px; position: absolute; transform: scale(0.4); opacity: .5 } .loader-12 { -webkit-animation: stars-rotate-reverse 2s ease infinite; animation: stars-rotate-reve.........完整代码请登录后点击上方下载按钮下载查看
网友评论0