首页 > 代码库 > 网站引入特殊字体

网站引入特殊字体

先获取这些字体文件

技术分享

然后添加css

/*引入字体(pt-din-condensed-cyrillic)*/
@font-face {
  font-family: ‘pt‘;
  src: url(‘../font/pt/pt-din-condensed-cyrillic.eot‘);
  src: url(‘../font/pt/pt-din-condensed-cyrillic.eot?#iefix‘) format(‘embedded-opentype‘),
  url(‘../font/pt/pt-din-condensed-cyrillic.woff‘) format(‘woff‘),
  url(‘../font/pt/pt-din-condensed-cyrillic.ttf‘) format(‘truetype‘),
  url(‘../font/pt/pt-din-condensed-cyrillic.svg‘) format(‘svg‘);
  font-style: normal;
  font-weight: normal;
}

 

网站引入特殊字体