其他计算机浏览器中的字体系列更改

时间:2015-06-23 07:53:33

标签: html css css3 browser fonts

我有一个font-family: "Cooper Std Black";的div。它看起来像下图:

enter image description here

但是,当我使用另一台计算机,同一浏览器(谷歌浏览器/两者都更新)时,它的外观变化。怎么了?我确保清除了两个浏览器的缓存。

enter image description here

以下是我的CSS代码:

.myid_print_duo_college
{
    z-index: 1;
    position: absolute;
    left: 0px;
    top: 440px;
    color: #0C6A13;
    width: 304px;
    height: 42px;
    line-height: 42px;
    text-align: center;  
    font-weight: bold;
    font-size: 20px;
    font-family: "Cooper Std Black"; 
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;   
}

2 个答案:

答案 0 :(得分:3)

看起来Cooper Std Black未安装在另一台计算机上。也许您在计算机上手动安装了此字体。 This question可以帮助您正确嵌入字体。

答案 1 :(得分:3)

您需要添加字体,如

@font-face {
    font-family: 'Cooper Std Black';
    src: url('fonts/Cooper Std Black.eot'), url('fonts/Cooper Std Black.ttf') format('truetype'), url('fonts/Cooper Std Black.svg') format('svg');
    font-weight: bold;
    font-style: normal;
}

您可以使用下面的字体

.myid_print_duo_college
{
    font-family:'Cooper Std Black';
}