0
http://www.chooseyourtelescope.com/字体家庭不字型工作
大“C”,在页面的中间,H1(“选择正确的......)应以‘Pirulen’FONT-FAMILY写。
我首先尝试了“经典”@ font-face方法,然后通过使用WEBFONT GENERATOR并添加在MyFonts文件夹中创建的所有文件。
CSS
@font-face {
font-family: 'pirulenregular';
src: url('/www/wp-content/themes/virtue - child/MyFonts/pirulen_rg-webfont.eot');
src: url('/www/wp-content/themes/virtue - child/MyFonts/pirulen_rg-webfont.eot?#iefix') format('embedded-opentype'),
url('/www/wp-content/themes/virtue - child/MyFonts/pirulen_rg-webfont.woff2') format('woff2'),
url('/www/wp-content/themes/virtue - child/MyFonts/pirulen_rg-webfont.woff') format('woff'),
url('/www/wp-content/themes/virtue - child/MyFonts/pirulen_rg-webfont.ttf') format('truetype'),
url('/www/wp-content/themes/virtue - child/MyFonts/pirulen_rg-webfont.svg#pirulenregular') format('svg');
font-weight: normal;
font-style: normal;
}
但它仍然无法正常工作
啊是的我忘记了在CSS中改变'pirulenregular'的名字。但无论如何,我曾尝试过在页面+ CSS中使用pirulenregular,但它不起作用。 “文件路径”是问题。感谢它现在的工作;) – edou777