关闭边栏(ESC)打开边栏(ESC)
这是从无人小站上copy下来的,挺喜欢他的这个过滤的效果的,希望以后的更新中可以用到。
HTML结构
1 2 3 4 5 6 7 8 9 |
<div id="loading"> <div id="loading-center"> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> </div> </div> |
CSS样式
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
/* * Loading */ #loading { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999; background-color: #FFFFFF; display: none; } #loading-center { width: 100%; position: absolute; top: 47%; left: 0; right: 0; margin: 0 auto; text-align: center; } #loading-center .dot { width: 24px; height: 24px; background: #3ac; border-radius: 100%; display: inline-block; animation: slide 1s infinite; } #loading-center .dot:nth-child(1) { animation-delay: 0.1s; background: #32aacc; } #loading-center .dot:nth-child(2) { animation-delay: 0.2s; background: #64aacc; } #loading-center .dot:nth-child(3) { animation-delay: 0.3s; background: #96aacc; } #loading-center .dot:nth-child(4) { animation-delay: 0.4s; background: #c8aacc; } #loading-center .dot:nth-child(5) { animation-delay: 0.5s; background: #faaacc; } @-moz-keyframes slide { 0% { transform: scale(1); } 50% { opacity: 0.3; transform: scale(2); } 100% { transform: scale(1); } } @-webkit-keyframes slide { 0% { transform: scale(1); } 50% { opacity: 0.3; transform: scale(2); } 100% { transform: scale(1); } } @-o-keyframes slide { 0% { transform: scale(1); } 50% { opacity: 0.3; transform: scale(2); } 100% { transform: scale(1); } } @keyframes slide { 0% { transform: scale(1); } 50% { opacity: 0.3; transform: scale(2); } 100% { transform: scale(1); } } |
过渡效果如下:
偶尔一两张图片拖慢了加载速度,想查看文章就很慢了
是的,如果网站速度慢的话,这个加载就不太好了,但可以点击一下隐藏这个加载动画的
太强大了!
哈,没有吧
可是我打开的时候有时候一两个圆圈会比较快。。。
看不明白你说的是什么
就是动画顺序不对了。
是向右动的效果的
感觉没有大佬copy不了的网站
是的呢,打开文章是ajax加载的