1

我已经下载了 Ubuntu 字体以在我的网页上使用

#link-r {
    color: white;
font-family: "ubuntu";
font-size: 16px;
float: left;
text-decoration: none;
}

@font-face {
    font-family: 'ubuntu'; /*a name to be used later*/
    src: url('fonts/ubuntu.tff'); /*URL to font*/
}
4

2 回答 2

0

在哪个浏览器中不起作用?请确保字体类型在上述路径中可用。

Internet Explorer 9、Firefox、Opera、Chrome 和 Safari 支持 @font-face 规则。

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

注意:Internet Explorer 8 及更早版本,不支持@font-face 规则。

于 2013-07-30T04:34:41.393 回答
0

将以下代码行添加到您的网站:

<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>

欲了解更多信息,请查看这里

于 2013-07-30T04:49:59.967 回答