Font Awesome with Ionic2

后端 未结 1 884
温柔的废话
温柔的废话 2021-01-19 15:12

How to use Font Awesome icons with ?

What I am trying:


    

        
1条回答
  •  孤独总比滥情好
    2021-01-19 15:27

    Here is my solution to add Font Awesome

    Note: Make sure you have properly installed font awesome in your ionic project.

    your-example.html

    
         
    
    

    your-example.scss

    .fa-icons-general {
        display: inline-block;
        font: normal normal normal 14px/1 FontAwesome;
        font-size: inherit;
        text-rendering: auto;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        transform: translate(0, 0);
    }
    
    .ion-ios-fa-sitemap::before,
        .ion-ios-fa-sitemap-outline::before,
        .ion-md-fa-sitemap::before {
            @extend .fa-icons-general;
            content: "\f0e8";
        }
    

    Hope this will solve your problem.

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