1、
<div id="loadingWrap1"> <span></span> <span></span> <span></span> <span></span> <span></span>
</div> #loadingWrap1 { position: relative } #loadingWrap1 span { display: block; bottom: 0; 9px; height: 5px; background: #9b59b6; position: absolute; -webkit-animation: loadingWrap1 1.5s infinite ease-in-out; -moz-animation: loadingWrap1 1.5s infinite ease-in-out; -ms-animation: loadingWrap1 1.5s infinite ease-in-out; -o-animation: loadingWrap1 1.5s infinite ease-in-out; animation: loadingWrap1 1.5s infinite ease-in-out } #loadingWrap1 span:nth-child(2) { left: 11px; -webkit-animation-delay: .2s; -moz-animation-delay: .2s; -ms-animation-delay: .2s; -o-animation-delay: .2s; animation-delay: .2s } #loadingWrap1 span:nth-child(3) { left: 22px; -webkit-animation-delay: .4s; -moz-animation-delay: .4s; -ms-animation-delay: .4s; -o-animation-delay: .4s; animation-delay: .4s } #loadingWrap1 span:nth-child(4) { left: 33px; -webkit-animation-delay: .6s; -moz-animation-delay: .6s; -ms-animation-delay: .6s; -o-animation-delay: .6s; animation-delay: .6s } #loadingWrap1 span:nth-child(5) { left: 44px; -webkit-animation-delay: .8s; -moz-animation-delay: .8s; -ms-animation-delay: .8s; -o-animation-delay: .8s; animation-delay: .8s } @-webkit-keyframes loadingWrap1 { 0% { height: 5px; -webkit-transform: translateY(0px); background: #9b59b6 } 25% { height: 30px; -webkit-transform: translateY(15px); background: #3498db } 50% { height: 5px; -webkit-transform: translateY(0px); background: #9b59b6 } 100% { height: 5px; -webkit-transform: translateY(0px); background: #9b59b6 } } @-moz-keyframes loadingWrap1 { 0% { height: 5px; -moz-transform: translateY(0px); background: #9b59b6 } 25% { height: 30px; -moz-transform: translateY(15px); background: #3498db } 50% { height: 5px; -moz-transform: translateY(0px); background: #9b59b6 } 100% { height: 5px; -moz-transform: translateY(0px); background: #9b59b6 } } @-ms-keyframes loadingWrap1 { 0% { height: 5px; -ms-transform: translateY(0px); background: #9b59b6 } 25% { height: 30px; -ms-transform: translateY(15px); background: #3498db } 50% { height: 5px; -ms-transform: translateY(0px); background: #9b59b6 } 100% { height: 5px; -ms-transform: translateY(0px); background: #9b59b6 } } @keyframes loadingWrap1 { 0% { height: 5px; transform: translateY(0px); background: #9b59b6 } 25% { height: 30px; transform: translateY(15px); background: #3498db } 50% { height: 5px; transform: translateY(0px); background: #9b59b6 } 100% { height: 5px; transform: translateY(0px); background: #9b59b6 } }
2、
<div id="loadingWrap2"> <span></span> <span></span> <span></span> <span></span> </div> #loadingWrap2 { position: relative; left: 50%; 40px; height: 40px } #loadingWrap2 span { display: block; bottom: 0; 20px; height: 20px; background: #9b59b6; position: absolute } #loadingWrap2 span:nth-child(1) { -webkit-animation: loadingWrap2_1 1.5s infinite ease-in-out; -moz-animation: loadingWrap2_1 1.5s infinite ease-in-out; -ms-animation: loadingWrap2_1 1.5s infinite ease-in-out; animation: loadingWrap2_1 1.5s infinite ease-in-out } #loadingWrap2 span:nth-child(2) { left: 20px; -webkit-animation: loadingWrap2_2 1.5s infinite ease-in-out; -moz-animation: loadingWrap2_2 1.5s infinite ease-in-out; -ms-animation: loadingWrap2_2 1.5s infinite ease-in-out; animation: loadingWrap2_2 1.5s infinite ease-in-out } #loadingWrap2 span:nth-child(3) { top: 0; -webkit-animation: loadingWrap2_3 1.5s infinite ease-in-out; -moz-animation: loadingWrap2_3 1.5s infinite ease-in-out; -ms-animation: loadingWrap2_3 1.5s infinite ease-in-out; animation: loadingWrap2_3 1.5s infinite ease-in-out } #loadingWrap2 span:nth-child(4) { top: 0; left: 20px; -webkit-animation: loadingWrap2_4 1.5s infinite ease-in-out; -moz-animation: loadingWrap2_4 1.5s infinite ease-in-out; -ms-animation: loadingWrap2_4 1.5s infinite ease-in-out; animation: loadingWrap2_4 1.5s infinite ease-in-out } @-webkit-keyframes loadingWrap2_1 { 0% { -webkit-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -webkit-transform: translateX(-20px) translateY(-10px) rotate(-180deg); border-radius: 20px; background: #3498db } 80% { -webkit-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } 100% { -webkit-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } } @-webkit-keyframes loadingWrap2_2 { 0% { -webkit-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -webkit-transform: translateX(20px) translateY(-10px) rotate(180deg); border-radius: 20px; background: #f1c40f } 80% { -webkit-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } 100% { -webkit-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } } @-webkit-keyframes loadingWrap2_3 { 0% { -webkit-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -webkit-transform: translateX(-20px) translateY(10px) rotate(-180deg); border-radius: 20px; background: #2ecc71 } 80% { -webkit-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } 100% { -webkit-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } } @-webkit-keyframes loadingWrap2_4 { 0% { -webkit-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -webkit-transform: translateX(20px) translateY(10px) rotate(180deg); border-radius: 20px; background: #e74c3c } 80% { -webkit-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } 100% { -webkit-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } } @-moz-keyframes loadingWrap2_1 { 0% { -moz-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -moz-transform: translateX(-20px) translateY(-10px) rotate(-180deg); border-radius: 20px; background: #3498db } 80% { -moz-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } 100% { -moz-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } } @-moz-keyframes loadingWrap2_2 { 0% { -moz-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -moz-transform: translateX(20px) translateY(-10px) rotate(180deg); border-radius: 20px; background: #f1c40f } 80% { -moz-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } 100% { -moz-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } } @-moz-keyframes loadingWrap2_3 { 0% { -moz-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -moz-transform: translateX(-20px) translateY(10px) rotate(-180deg); border-radius: 20px; background: #2ecc71 } 80% { -moz-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } 100% { -moz-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } } @-moz-keyframes loadingWrap2_4 { 0% { -moz-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -moz-transform: translateX(20px) translateY(10px) rotate(180deg); border-radius: 20px; background: #e74c3c } 80% { -moz-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } 100% { -moz-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } } @-ms-keyframes loadingWrap2_1 { 0% { -ms-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -ms-transform: translateX(-20px) translateY(-10px) rotate(-180deg); border-radius: 20px; background: #3498db } 80% { -ms-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } 100% { -ms-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } } @-ms-keyframes loadingWrap2_2 { 0% { -ms-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -ms-transform: translateX(20px) translateY(-10px) rotate(180deg); border-radius: 20px; background: #f1c40f } 80% { -ms-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } 100% { -ms-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } } @-ms-keyframes loadingWrap2_3 { 0% { -ms-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -ms-transform: translateX(-20px) translateY(10px) rotate(-180deg); border-radius: 20px; background: #2ecc71 } 80% { -ms-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } 100% { -ms-transform: translateX(0px) translateY(0px) rotate(-360deg); border-radius: 0 } } @-ms-keyframes loadingWrap2_4 { 0% { -ms-transform: translateX(0px) translateY(0px) rotate(0deg); border-radius: 0 } 50% { -ms-transform: translateX(20px) translateY(10px) rotate(180deg); border-radius: 20px; background: #e74c3c } 80% { -ms-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } 100% { -ms-transform: translateX(0px) translateY(0px) rotate(360deg); border-radius: 0 } } @-keyframes loadingWrap2_1 { 0% { -transform: translateX(0px)translateY(0px)rotate(0deg); border-radius: 0px; } 50% { -transform: translateX(-20px)translateY(-10px)rotate(-180deg); border-radius: 20px; background: #3498db; } 80% { -transform: translateX(0px)translateY(0px)rotate(-360deg); border-radius: 0px; } 100% { -transform: translateX(0px)translateY(0px)rotate(-360deg); border-radius: 0px; } } @-keyframes loadingWrap2_2 { 0% { -transform: translateX(0px)translateY(0px)rotate(0deg); border-radius: 0px; } 50% { -transform: translateX(20px)translateY(-10px)rotate(180deg); border-radius: 20px; background: #f1c40f; } 80% { -transform: translateX(0px)translateY(0px)rotate(360deg); border-radius: 0px; } 100% { -transform: translateX(0px)translateY(0px)rotate(360deg); border-radius: 0px; } } @-keyframes loadingWrap2_3 { 0% { -transform: translateX(0px)translateY(0px)rotate(0deg); border-radius: 0px; } 50% { -transform: translateX(-20px)translateY(10px)rotate(-180deg); border-radius: 20px; background: #2ecc71; } 80% { -transform: translateX(0px)translateY(0px)rotate(-360deg); border-radius: 0px; } 100% { -transform: translateX(0px)translateY(0px)rotate(-360deg); border-radius: 0px; } } @-keyframes loadingWrap2_4 { 0% { -transform: translateX(0px)translateY(0px)rotate(0deg); border-radius: 0px; } 50% { -transform: translateX(20px)translateY(10px)rotate(180deg); border-radius: 20px; background: #e74c3c; } 80% { -transform: translateX(0px)translateY(0px)rotate(360deg); border-radius: 0px; } 100% { -transform: translateX(0px)translateY(0px)rotate(360deg); border-radius: 0px; } }
3、
<div id="loadingWrap3"></div> #loadingWrap3 { position: relative } #loadingWrap3:before { 20px; height: 20px; border-radius: 20px; background: blue; content: ''; position: absolute; background: #9b59b6; -webkit-animation: loadingWrap3_before 1.5s infinite ease-in-out; -moz-animation: loadingWrap3_before 1.5s infinite ease-in-out; -ms-animation: loadingWrap3_before 1.5s infinite ease-in-out; animation: loadingWrap3_before 1.5s infinite ease-in-out } #loadingWrap3:after { 20px; height: 20px; border-radius: 20px; background: blue; content: ''; position: absolute; background: #2ecc71; left: 22px; -webkit-animation: loadingWrap3_after 1.5s infinite ease-in-out; -moz-animation: loadingWrap3_after 1.5s infinite ease-in-out; -ms-animation: loadingWrap3_after 1.5s infinite ease-in-out; animation: loadingWrap3_after 1.5s infinite ease-in-out } @-webkit-keyframes loadingWrap3_before { 0% { -webkit-transform: translateX(0px) rotate(0deg) } 50% { -webkit-transform: translateX(50px) scale(1.2) rotate(260deg); background: #2ecc71; border-radius: 0 } 100% { -webkit-transform: translateX(0px) rotate(0deg) } } @-webkit-keyframes loadingWrap3_after { 0% { -webkit-transform: translateX(0px) } 50% { -webkit-transform: translateX(-50px) scale(1.2) rotate(-260deg); background: #9b59b6; border-radius: 0 } 100% { -webkit-transform: translateX(0px) } } @-moz-keyframes loadingWrap3_before { 0% { -moz-transform: translateX(0px) rotate(0deg) } 50% { -moz-transform: translateX(50px) scale(1.2) rotate(260deg); background: #2ecc71; border-radius: 0 } 100% { -moz-transform: translateX(0px) rotate(0deg) } } @-moz-keyframes loadingWrap3_after { 0% { -moz-transform: translateX(0px) } 50% { -moz-transform: translateX(-50px) scale(1.2) rotate(-260deg); background: #9b59b6; border-radius: 0 } 100% { -moz-transform: translateX(0px) } } @-ms-keyframes loadingWrap3_before { 0% { -ms-transform: translateX(0px) rotate(0deg) } 50% { -ms-transform: translateX(50px) scale(1.2) rotate(260deg); background: #2ecc71; border-radius: 0 } 100% { -ms-transform: translateX(0px) rotate(0deg) } } @-ms-keyframes loadingWrap3_after { 0% { -ms-transform: translateX(0px) } 50% { -ms-transform: translateX(-50px) scale(1.2) rotate(-260deg); background: #9b59b6; border-radius: 0 } 100% { -ms-transform: translateX(0px) } } @keyframes loadingWrap3_before { 0% { transform: translateX(0px) rotate(0deg) } 50% { transform: translateX(50px) scale(1.2) rotate(260deg); background: #2ecc71; border-radius: 0 } 100% { transform: translateX(0px) rotate(0deg) } } @keyframes loadingWrap3_after { 0% { transform: translateX(0px) } 50% { transform: translateX(-50px) scale(1.2) rotate(-260deg); background: #9b59b6; border-radius: 0 } 100% { transform: translateX(0px) } }
4、
<div id="loadingWrap4"> <span></span> <span></span> <span></span> <span></span> <span></span> </div> #loadingWrap4 { position: relative } #loadingWrap4 span { position: absolute; 20px; height: 20px; background: #3498db; opacity: .5; border-radius: 20px; -webkit-animation: loadingWrap4 1s infinite ease-in-out; -moz-animation: loadingWrap4 1s infinite ease-in-out; -ms-animation: loadingWrap4 1s infinite ease-in-out; -animation: loadingWrap4 1s infinite ease-in-out } #loadingWrap4 span:nth-child(2) { left:20px; -webkit-animation-delay: .2s; -moz-animation-delay: .2s; -ms-animation-delay: .2s; animation-delay: .2s } #loadingWrap4 span:nth-child(3) { left:40px; -webkit-animation-delay: .4s; -moz-animation-delay: .4s; -ms-animation-delay: .4s; animation-delay: .4s } #loadingWrap4 span:nth-child(4) { left:60px; -webkit-animation-delay: .6s; -moz-animation-delay: .6s; -ms-animation-delay: .6s; animation-delay: .6s } #loadingWrap4 span:nth-child(5) { left:80px; -webkit-animation-delay: .8s; -moz-animation-delay: .8s; -ms-animation-delay: .8s; animation-delay: .8s } @-webkit-keyframes loadingWrap4 { 0% { opacity: .3; -webkit-transform: translateY(0px); box-shadow: 0 0 3px rgba(0,0,0,.1) } 50% { opacity: 1; -webkit-transform: translateY(-10px); background: #f1c40f; box-shadow: 0 20px 3px rgba(0,0,0,.05) } 100% { opacity: .3; -webkit-transform: translateY(0px); box-shadow: 0 0 3px rgba(0,0,0,.1) } } @-moz-keyframes loadingWrap4 { 0% { opacity: .3; -moz-transform: translateY(0px); box-shadow: 0 0 3px rgba(0,0,0,.1) } 50% { opacity: 1; -moz-transform: translateY(-10px); background: #f1c40f; box-shadow: 0 20px 3px rgba(0,0,0,.05) } 100% { opacity: .3; -moz-transform: translateY(0px); box-shadow: 0 0 3px rgba(0,0,0,.1) } } @-ms-keyframes loadingWrap4 { 0% { opacity: .3; -ms-transform: translateY(0px); box-shadow: 0 0 3px rgba(0,0,0,.1) } 50% { opacity: 1; -ms-transform: translateY(-10px); background: #f1c40f; box-shadow: 0 20px 3px rgba(0,0,0,.05) } 100% { opacity: .3; -ms-transform: translateY(0px); box-shadow: 0 0 3px rgba(0,0,0,.1) } } @keyframes loadingWrap4 { 0% { opacity: .3; transform: translateY(0px); box-shadow: 0 0 3px rgba(0,0,0,.1) } 50% { opacity: 1; transform: translateY(-10px); background: #f1c40f; box-shadow: 0 20px 3px rgba(0,0,0,.05) } 100% { opacity: .3; transform: translateY(0px); box-shadow: 0 0 3px rgba(0,0,0,.1) } }
5、
<div id="loadingWrap5"></div> #loadingWrap5 { position: relative; 30px; height: 30px; background: #3498db; border-radius: 50px; -webkit-animation: loadingWrap5 1.5s infinite linear; -moz-animation: loadingWrap5 1.5s infinite linear; -ms-animation: loadingWrap5 1.5s infinite linear; animation: loadingWrap5 1.5s infinite linear } #loadingWrap5:after { position: absolute; 50px; height: 50px; border-top: 10px solid #9b59b6; border-bottom: 10px solid #9b59b6; border-left: 10px solid transparent; border-right: 10px solid transparent; border-radius: 50px; content: ''; top: -20px; left: -20px; -webkit-animation: loadingWrap5_after 1.5s infinite linear; -moz-animation: loadingWrap5_after 1.5s infinite linear; -ms-animation: loadingWrap5_after 1.5s infinite linear; animation: loadingWrap5_after 1.5s infinite linear } @-webkit-keyframes loadingWrap5 { 0% { -webkit-transform: rotate(0deg) } 50% { -webkit-transform: rotate(180deg); background: #2ecc71 } 100% { -webkit-transform: rotate(360deg) } } @-webkit-keyframes loadingWrap5_after { 0% { border-top: 10px solid #9b59b6; border-bottom: 10px solid #9b59b6 } 50% { border-top: 10px solid #3498db; border-bottom: 10px solid #3498db } 100% { border-top: 10px solid #9b59b6; border-bottom: 10px solid #9b59b6 } } @-moz-keyframes loadingWrap5 { 0% { -moz-transform: rotate(0deg) } 50% { -moz-transform: rotate(180deg); background: #2ecc71 } 100% { -moz-transform: rotate(360deg) } } @-moz-keyframes loadingWrap5_after { 0% { border-top: 10px solid #9b59b6; border-bottom: 10px solid #9b59b6 } 50% { border-top: 10px solid #3498db; border-bottom: 10px solid #3498db } 100% { border-top: 10px solid #9b59b6; border-bottom: 10px solid #9b59b6 } } @-ms-keyframes loadingWrap5 { 0% { -ms-transform: rotate(0deg) } 50% { -ms-transform: rotate(180deg); background: #2ecc71 } 100% { -ms-transform: rotate(360deg) } } @-ms-keyframes loadingWrap5_after { 0% { border-top: 10px solid #9b59b6; border-bottom: 10px solid #9b59b6 } 50% { border-top: 10px solid #3498db; border-bottom: 10px solid #3498db } 100% { border-top: 10px solid #9b59b6; border-bottom: 10px solid #9b59b6 } } @keyframes loadingWrap5 { 0% { transform: rotate(0deg) } 50% { transform: rotate(180deg); background: #2ecc71 } 100% { transform: rotate(360deg) } } @keyframes loadingWrap5_after { 0% { border-top: 10px solid #9b59b6; border-bottom: 10px solid #9b59b6 } 50% { border-top: 10px solid #3498db; border-bottom: 10px solid #3498db } 100% { border-top: 10px solid #9b59b6; border-bottom: 10px solid #9b59b6 } }
6、
<div id="loadingWrap6"> <span></span> <span></span> <span></span> <span></span> </div> #loadingWrap6 { position: relative; 42px; height: 42px; -webkit-animation: loadingWrap6 5s infinite linear; -moz-animation: loadingWrap6 5s infinite linear; -ms-animation: loadingWrap6 5s infinite linear; animation: loadingWrap6 5s infinite linear } #loadingWrap6 span { 20px; height: 20px; position: absolute; background: red; display: block; -webkit-animation: loadingWrap6_span 1s infinite linear; -moz-animation: loadingWrap6_span 1s infinite linear; -ms-animation: loadingWrap6_span 1s infinite linear; animation: loadingWrap6_span 1s infinite linear } #loadingWrap6 span:nth-child(1) { background:#2ecc71 } #loadingWrap6 span:nth-child(2) { left:22px; background: #9b59b6; -webkit-animation-delay: .2s; -moz-animation-delay: .2s; -ms-animation-delay: .2s; animation-delay: .2s } #loadingWrap6 span:nth-child(3) { top:22px; background: #3498db; -webkit-animation-delay: .4s; -moz-animation-delay: .4s; -ms-animation-delay: .4s; animation-delay: .4s } #loadingWrap6 span:nth-child(4) { top:22px; left: 22px; background: #f1c40f; -webkit-animation-delay: .6s; -moz-animation-delay: .6s; -ms-animation-delay: .6s; animation-delay: .6s } @-webkit-keyframes loadingWrap6 { from { -webkit-transform: rotate(0deg) } to { -webkit-transform: rotate(360deg) } } @-webkit-keyframes loadingWrap6_span { 0% { -webkit-transform: scale(1) } 50% { -webkit-transform: scale(.5) } 100% { -webkit-transform: scale(1) } } @-moz-keyframes loadingWrap6 { from { -moz-transform: rotate(0deg) } to { -moz-transform: rotate(360deg) } } @-moz-keyframes loadingWrap6_span { 0% { -moz-transform: scale(1) } 50% { -moz-transform: scale(.5) } 100% { -moz-transform: scale(1) } } @-ms-keyframes loadingWrap6 { from { -ms-transform: rotate(0deg) } to { -ms-transform: rotate(360deg) } } @-ms-keyframes loadingWrap6_span { 0% { -ms-transform: scale(1) } 50% { -ms-transform: scale(.5) } 100% { -ms-transform: scale(1) } } @-ms-keyframes loadingWrap6 { from { -ms-transform: rotate(0deg) } to { -ms-transform: rotate(360deg) } } @keyframes loadingWrap6_span { 0% { transform: scale(1) } 50% { transform: scale(.5) } 100% { transform: scale(1) } }