css加载动画

此生再无相见时 提交于 2019-12-11 18:43:38
<div id="loading">
      <i></i>
    </div>
        #loading{
          display: block;
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          z-index: 999;
          background: #fff;
        }
        #loading i {
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          width: 50px;
          height: 50px;
          border: 4px solid #000;
          border-right-color: transparent;
          border-radius: 50%;
          animation: loadingAnimation 0.8s infinite Linear;
          margin: auto;
        }
        @keyframes loadingAnimation {
          from {
            transform: rotate(0deg);
          }
          to {
            transform: rotate(360deg);
          }
        }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!