Font Awesome 5 - how to put an icon inside a circle?

前端 未结 1 1443
半阙折子戏
半阙折子戏 2020-12-18 10:39

I\'m trying to put some Font Awesome icons over a div element, making it look like a circle that contains the icons. There are in total three icons inside a circle each, and

1条回答
  •  旧巷少年郎
    2020-12-18 11:35

    Font Awesome already allow this, you don't need to do it yourself:

    .custom .fa-circle:before {
      border-radius: 50%;
      background: linear-gradient(red, blue);
      color: transparent;
    }
    
    
    
        
        
    
    
        
        
    
    
        
        
    
    
        
        
    
    
    
        
        
    

    Related: https://fontawesome.com/how-to-use/on-the-web/styling/stacking-icons

    0 讨论(0)
提交回复
热议问题