当前位置:Gxlcms > css > 使用css实现加载中动画效果

使用css实现加载中动画效果

时间:2021-07-01 10:21:17 帮助过:61人阅读

css实现加载中动画效果如下:

1467969834174617.png

html

  1. <div class="ui-loading-wrap">
  2. <p>加载中</p>
  3. <i class="ui-loading"></i>
  4. </div>

css

  1. .ui-loading-wrap {
  2. display: -webkit-box;
  3. -webkit-box-pack: center;
  4. -webkit-box-align: center;
  5. text-align: center;
  6. height: 40px;
  7. .ui-loading {
  8. width: 20px;
  9. height: 20px;
  10. display: block;
  11. background: url(../img/loading_sprite.png);
  12. -webkit-background-size: auto 20px;
  13. -webkit-animation: am-rotate 1s steps(12) infinite;
  14. @-webkit-keyframes am-rotate {
  15. from {
  16. background-position: 0 0
  17. }
  18. to {
  19. background-position: -240px 0
  20. }
  21. }

图片地址:

1467970003251816.png

以上就是使用css实现加载中动画效果的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行