通过CSS自定义字体

Dar*_*ria 6 html css fonts font-face custom-font

我现在正在学习php,html和css,我正在尝试在我的网站上使用自定义字体.我找到了@font-face允许这样做的属性,但它不起作用.我究竟做错了什么?CSS:

@font-face {font-family: LazurskiCTT;src:url(../sources/fonts/ie/LazurskiCTT Regular.eot);}
/*IE*/ 
@font-face {font-family:LazurskiCTT;src:url(../sources/fonts/LazurskiCTT Regular.Ttf);}
/*Other browsers*/
#myFonts{font-family:LazurskiCTT;}
Run Code Online (Sandbox Code Playgroud)

HTML:

<p id="myFonts">Lazurski</p>
Run Code Online (Sandbox Code Playgroud)

也许是因为我在我的本地机器上使用它?我在FireFox中运行它.

mar*_*tnu 8

让它工作的最简单(也是最好)的方法是使用fontsquirrel的生成器:

http://www.fontsquirrel.com/fontface/generator