Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在网页上使用特定的非标准字体?_Html_Css_Fonts - Fatal编程技术网

Html 在网页上使用特定的非标准字体?

Html 在网页上使用特定的非标准字体?,html,css,fonts,Html,Css,Fonts,我需要使用字体ITC Avant garde Compressed Book and medium,但我认为这是非标准字体,那么我如何确保在客户端浏览器的网站上使用此字体?使用 @font-face { font-family: myFirstFont; src: url('ITC_Avant_garde_Condensed_Book.ttf'), url('ITC_Avant_garde_Condensed_Book.eot'); /* IE9 */ } 阅读更多: 记住 Inte

我需要使用字体ITC Avant garde Compressed Book and medium,但我认为这是非标准字体,那么我如何确保在客户端浏览器的网站上使用此字体?

使用

@font-face
{
font-family: myFirstFont;
src: url('ITC_Avant_garde_Condensed_Book.ttf'),
     url('ITC_Avant_garde_Condensed_Book.eot'); /* IE9 */
}
阅读更多:

记住

Internet Explorer 9、Firefox、, 歌剧、铬合金和狩猎

但是,Internet Explorer 9仅支持.eot类型字体,而 Firefox、Chrome、Safari和Opera支持.ttf和.otf类型字体

Internet Explorer 8和早期版本不支持 @字体规则


您可以将字体放在服务器上,然后在CSS中使用它,如:

@font-face
{
 font-family:myFamily;
 src:url('your_source_here/fontName.ttf'),
     url('your_source_here/fontName.eot');
 }
由于IE8不支持
@font-face
,因此您应该有一个备用字体


要获得不同格式的字体,您可以使用

此处描述的所有您需要了解的内容的可能副本: