css实现五种loading加载动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:css实现五种loading加载动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html> <head> <style> html { height: 100%; } body { background: #222; height: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; } .preload-1 { position: relative; margin-bottom: 40px; } .preload-1 span { display: block; position: absolute; bottom: 0px; width: 9px; height: 5px; background: coral; -webkit-animation: preload-1 1.5s infinite ease-in-out; animation: preload-1 1.5s infinite ease-in-out; } .preload-1 span:nth-child(2) { left: 11px; -webkit-animation-delay: .2s; animation-delay: .2s; } .preload-1 span:nth-child(3) { left: 22px; -webkit-animation-delay: .4s; animation-delay: .4s; } .preload-1 span:nth-child(4) { left: 33px; -webkit-animation-delay: .6s; animation-delay: .6s; } .preload-1 span:nth-child(5) { left: 44px; -webkit-animation-delay: .8s; animation-delay: .8s; } @-webkit-keyframes preload-1 { 0% { height: 5px; -webkit-transform: translateY(0px); transform: translateY(0px); background: coral; } 25% { height: 30px; -webkit-transform: translateY(15px); transform: translateY(15px); background: cornflowerblue; } 50% { height: 5px; -webkit-transform: translateY(0px); transform: translateY(0px); background: cornflowerblue; } 100% { height: 5px; -webkit-transform: translateY(0px); transform: translateY(0px); background: coral; } } @keyframes preload-1 { 0% { height: 5px; -webkit-transform: translateY(0px); transform: translateY(0px); background: coral; } 25% { height: 30px; -webkit-transform: translateY(15px); transform: translateY(15px); background: cornflowerblue; } 50% { height: 5px; -webkit-transform: translateY(0px); transform: translateY(0px); background: cornflowerblue; } 100% { height: 5px; -webkit-transform: translat.........完整代码请登录后点击上方下载按钮下载查看
网友评论0