简体   繁体   中英

resizing google material icons font size

According to the official guide, adding "md-48" to the class is supposed the resize the font to 48px, yet here it's not working. Am I missing something? I also tried using CSS to set the font size of .material-icons to 48px yet it remains unaffected.

 /*.material-icons{ font-size: 48px; }*/ 
 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <div class="container-fluid mobileMenu"> <i class="material-icons md-48">list</i> </div> 

I don't know about material icons and their css classes.
But if you just use !important you can overwrite the fontsize.

 .md-48 { font-size: 48px !important; } 
 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <div class="container-fluid mobileMenu"> <i class="material-icons">list</i> <i class="material-icons md-48">list</i> </div> 

You can add directly in the tag the size of the icon, or add a CSS class to do this:

 .material-icons.md-60 { font-size: 60px; } 
 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <div class="container-fluid mobileMenu"> <i class="material-icons" style="font-size:60px;">list</i> </div> <div class="container-fluid mobileMenu"> <i class="material-icons md-60">list</i> </div> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM