Css 自定义字体无法使用ubuntu字体
我已经下载了Ubuntu字体用于我的网页Css 自定义字体无法使用ubuntu字体,css,Css,我已经下载了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*/ } 它
#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*/
}
它在哪个浏览器中不工作?请确保上述路径中的字体类型可用 Internet Explorer 9、Firefox、Opera、Chrome和Safari都支持@font-face规则 但是,Internet Explorer 9只支持.eot类型的字体,而Firefox、Chrome、Safari和Opera支持.ttf和.otf类型的字体
注意:Internet Explorer 8和早期版本不支持@font-face规则。将以下代码行添加到您的网站:
<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
有关更多信息,请查看