font awesome animated spinner through background

后端 未结 3 1830
盖世英雄少女心
盖世英雄少女心 2021-02-05 01:07

I am using font awesome spin icon through CSS background for loading the page.

3条回答
  •  没有蜡笔的小新
    2021-02-05 01:36

    Correct answer: Update CSS as given below.

        /* Styles go here */
    .loading-icon {
      position: relative;
      width: 20px;
      height: 20px; 
      margin:50px auto;
      -webkit-animation: fa-spin 2s infinite linear;
      animation: fa-spin 2s infinite linear;
    }
    
    .loading-icon:before {
      content: "\f110";
      font-family: FontAwesome;
      font-size:20px;
      position: absolute;
      top: 0; 
    }
    
    
    
    
      
      
    
    
    
      

提交回复
热议问题