我无法在我的网页上添加自定义字体

时间:2016-08-05 17:18:59

标签: css

我已将下面的代码添加到我的CSS中,但它仍然无法被Brackets识别,并且不在我的页面上。

@fontface{
    font-family: swedish-sans;
    src:url(SwedenSans.otf);
    font-weight: normal;
    font-style: normal;
}

尽管我的代码上面仍然没有在下面的代码中识别瑞典语 - sans。

.smart{

    font-family: swedish-sans, sans-serif;
    color:black;
    text-align: center;
    font-size:24px;
}

1 个答案:

答案 0 :(得分:2)

@font-face{ 
font-family: swedish-sans;   
src:url("SwedenSans.otf"); 
font-weight: normal; 
font-style: normal;
}