css 添加Web字体:复杂示例
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 添加Web字体:复杂示例相关的知识,希望对你有一定的参考价值。
<?php // do not copy this line, start with line 3
function my_bb_custom_fonts($system_fonts) {
$system_fonts[ 'TT Prosto Sans Condensed' ] = array(
'fallback' => 'Verdana, Arial, sans-serif',
'weights' => array(
'400',
'700',
),
);
$system_fonts[ 'TT Prosto Sans Condensed Italic' ] = array(
'fallback' => 'Verdana, Arial, sans-serif',
'weights' => array(
'400',
'700',
),
);
return $system_fonts;
}
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) */
@font-face {
font-family: 'TT Prosto Sans Condensed Italic';
src: url('prostosanscond-bold-italic-webfont.woff2') format('woff2'),
url('prostosanscond-bold-italic-webfont.woff') format('woff');
font-weight: 700;
}
@font-face {
font-family: 'TT Prosto Sans Condensed';
src: url('prostosanscond-bold-webfont.woff2') format('woff2'),
url('prostosanscond-bold-webfont.woff') format('woff');
font-weight: 700;
}
@font-face {
font-family: 'TT Prosto Sans Condensed Italic';
src: url('prostosanscond-italic-webfont.woff2') format('woff2'),
url('prostosanscond-italic-webfont.woff') format('woff');
font-weight: 400;
}
@font-face {
font-family: 'TT Prosto Sans Condensed';
src: url('prostosanscond-regular-webfont.woff2') format('woff2'),
url('prostosanscond-regular-webfont.woff') format('woff');
font-weight: 400;
}
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) */
@font-face {
font-family: 'tt_prosto_sans_condensedBdIt';
src: url('prostosanscond-bold-italic-webfont.woff2') format('woff2'),
url('prostosanscond-bold-italic-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'tt_prosto_sans_condensedbold';
src: url('prostosanscond-bold-webfont.woff2') format('woff2'),
url('prostosanscond-bold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'tt_prosto_sans_condensedIt';
src: url('prostosanscond-italic-webfont.woff2') format('woff2'),
url('prostosanscond-italic-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'tt_prosto_sans_condensedRg';
src: url('prostosanscond-regular-webfont.woff2') format('woff2'),
url('prostosanscond-regular-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
以上是关于css 添加Web字体:复杂示例的主要内容,如果未能解决你的问题,请参考以下文章
web字体图标的使用
VS Code添加新字体HTML [重复]
web前端入门到实战:常见CSS3选择器和文本字体样式汇总
css 使用Google字体中的Proxima Nova示例CSS。
css 使用Google字体中的Proxima Nova示例CSS。
使用 CSS 修复自定义字体行高