简体   繁体   中英

Custom font not working ubuntu font

I have downloaded the Ubuntu font to use on my webpage

#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*/
}

in which browser it is not working? Please make sure that font type is available in the mentioned path.

The @font-face rule is supported in Internet Explorer 9, Firefox, Opera, Chrome, and Safari.

However, Internet Explorer 9 only supports .eot type fonts, while Firefox, Chrome, Safari, and Opera support .ttf and .otf type fonts.

Note: Internet Explorer 8 and earlier versions, do not support the @font-face rule.

Add the following line of code to your website:

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

For more info, please take a look Here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM