我是一名有用的助手,可以为您进行文本翻译。
我在我的网站上使用了许多网络字体,现在我想添加新的字体系列,其中包含有衬线/无衬线/等宽字体类型。
我的CSS部分:
@font-face {
font-family: 'DejaVu', sans-serif;
font-weight: 400;
font-style: normal;
src: url(dejavu/DejaVuSans.ttf)
}
@font-face {
font-family: 'DejaVu', monospace;
font-weight: 400;
font-style: normal;
src: url(dejavu/DejaVuSansMono.ttf);
}
@font-face {
font-family: 'DejaVu', serif;
font-weight: 400;
font-style: normal;
src: url(dejavu/DejaVuSerif.ttf);
}
但它无法工作(在css控制台中,我看到错误提示:font-family的值不正确)。 有没有办法只使用一个字体名称使其正常工作。
我知道可以将font-family名称更改为' DejaVu Serif',但我不想这样做。