Use multiple custom fonts using @font-face?

前端 未结 5 1864
别那么骄傲
别那么骄傲 2021-01-31 01:07

I\'m sure I\'m missing something really straight forward. Been using a single custom font with normal font face:

@font-fa         


        
5条回答
  •  暖寄归人
    2021-01-31 01:58

    You can use multiple font faces quite easily. Below is an example of how I used it in the past:

    
        
    
    
        
    
    

    It is worth noting that fonts can be funny across different Browsers. Font face on earlier browsers works, but you need to use eot files instead of ttf.

    That is why I include my fonts in the head of the html file as I can then use conditional IE tags to use eot or ttf files accordingly.

    If you need to convert ttf to eot for this purpose there is a brilliant website you can do this for free online, which can be found at http://ttf2eot.sebastiankippe.com/.

    Hope that helps.

提交回复
热议问题