Loaders.css是一款很是出色的加载动画框架,Loaders.css利用纯CSS能够实现不少种样式的Loading加载动画,这些动画并不须要图片来辅助,而是仅仅须要CSS便可实现,所以运行效率比较不错。css
下面是第一行第4个Loading动画的CSS代码,其余的你们能够在源代码中查看。html
.ball-clip-rotate-pulse {
position: relative; -webkit-transform: translateY(-15px); -ms-transform: translateY(-15px); transform: translateY(-15px); } /* line 262, stdin */ .ball-clip-rotate-pulse > div { -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; top: 0px; left: 0px; border-radius: 100%; } /* line 269, stdin */ .ball-clip-rotate-pulse > div:first-child { background: #fff; height: 16px; width: 16px; top: 9px; left: 9px; -webkit-animation: scale 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; animation: scale 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; } /* line 277, stdin */ .ball-clip-rotate-pulse > div:last-child { position: absolute; border: 2px solid #fff; width: 30px; height: 30px; background: transparent; border: 2px solid; border-color: #fff transparent #fff transparent; -webkit-animation: rotate 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; animation: rotate 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; -webkit-animation-duration: 1s; animation-duration: 1s; }
在线演示地址:http://static.codeceo.com/demo/201505/loaders.css/index.htmlgit
GitHub地址:https://github.com/ConnorAtherton/loaders.cssgithub