How Do I Make Glyphicons Bigger? (Change Size?)

前端 未结 7 566
借酒劲吻你
借酒劲吻你 2021-01-29 19:12

I would like to make the globe glyphicon bigger so that it covers up a large portion of the page (it\'s a vector image). It\'s not in a button or anything; it\'s just alone. Is

相关标签:
7条回答
  • 2021-01-29 19:27

    Fontawesome has a perfect solution to this.

    I implemented the same. just on your main .css file add this

    .gi-2x{font-size: 2em;}
    .gi-3x{font-size: 3em;}
    .gi-4x{font-size: 4em;}
    .gi-5x{font-size: 5em;}
    

    In your example you just have to do this.

    <div class = "jumbotron">
        <span class="glyphicon glyphicon-globe gi-5x"></span>
    </div>  
    
    0 讨论(0)
  • 2021-01-29 19:27

    Yes, and basically you can also use inline style:

    <span style="font-size: 15px" class="glyphicon glyphicon-cog"></span>
    
    0 讨论(0)
  • 2021-01-29 19:29

    For ex .. add class:

    btn-lg - LARGE

    btn-sm - SMALL

    btn-xs - Very small

    <button type=button class="btn btn-default btn-lg">
    <span class="glyphicon glyphicon-star" aria-hidden=true></span> Star
    </button> 
    
    <button type=button class="btn btn-default">
    <span class="glyphicon glyphicon-star" aria-hidden=true></span>Star
    </button>
    
     <button type=button class="btn btn-default btn-sm">
    <span class="glyphicon glyphicon-star" aria-hidden=true></span> Star
    </button> 
    
    <button type=button class="btn btn-default btn-xs">
    <span class="glyphicon glyphicon-star" aria-hidden=true></span> Star
    </button> 
    

    Ref link Bootstrap : Glyphicons Bootstrap

    0 讨论(0)
  • 2021-01-29 19:32

    If you are using bootstrap and font-awesome then it is easy, no need to write a single line of new code, just add fa-Nx, as big you want, See the demo

    <span class="glyphicon glyphicon-globe"></span>
    <span class="glyphicon glyphicon-globe fa-lg"></span>
    <span class="glyphicon glyphicon-globe fa-2x"></span>
    <span class="glyphicon glyphicon-globe fa-3x"></span>
    <span class="glyphicon glyphicon-globe fa-4x"></span>
    <span class="glyphicon glyphicon-globe fa-5x"></span>
    
    0 讨论(0)
  • 2021-01-29 19:36

    I've used bootstrap header classes ("h1", "h2", etc.) for this. This way you get all the style benefits without using the actual tags. Here is an example:

    <div class="h3"><span class="glyphicon glyphicon-tags" aria-hidden="true"></span></div>

    0 讨论(0)
  • 2021-01-29 19:46

    Increase the font-size of glyphicon to increase all icons size.

    .glyphicon {
        font-size: 50px;
    }
    

    To target only one icon,

    .glyphicon.glyphicon-globe {
        font-size: 75px;
    }
    
    0 讨论(0)
提交回复
热议问题