Exemple de code de la règle CSS @font-face{}.
<style type="text/css">
@font-face{
font-family: 'maFonte';
src: url('/img/screenshot_css/breac_webfont.eot'); /* Hack IE6 */
src: url('/img/screenshot_css/breac_webfont.eot?#iefix') format('embedded-opentype'),
url('/img/screenshot_css/breac_webfont.woff') format('woff'),
url('/img/screenshot_css/breac_webfont.woff2') format('woff2'),
url('/img/screenshot_css/breac_webfont.ttf') format('truetype'),
url('/img/screenshot_css/breac_webfont.svg#breac_webfont') format('svg');
}
@font-face{
font-family: 'maFonteItalic';
src: url('/img/screenshot_css/breac_webfont.eot'); /* Hack IE6 */
src: url('/img/screenshot_css/breac_webfont.eot?#iefix') format('embedded-opentype'),
url('/img/screenshot_css/breac_webfont.woff') format('woff'),
url('/img/screenshot_css/breac_webfont.woff2') format('woff2'),
url('/img/screenshot_css/breac_webfont.ttf') format('truetype'),
url('/img/screenshot_css/breac_webfont.svg#breac_webfont') format('svg');
font-stretch : normal;
font-weight : normal;
font-style : italic;
}
</style>
.identifiant {font-family:'maFonte'}
<div style="font-family:'maFonte'; font-size:25px">abcdefghiABCDEFGH</div>
.identifiant {font-family:'maFonte'; font-style : italic; }
<div style="font-family:'maFonte'; font-size:25px; font-style:italic; ">abcdefghiABCDEFGH</div>
.identifiant {font-family:'maFonteItalic'}
<div style="font-family:'maFonteItalic'; font-size:25px; ">abcdefghiABCDEFGH</div>
.identifiant {font-family : 'maFonteItalic'; font-style : italic; }
<div style="font-family:'maFonteItalic'; font-size:25px; font-style:italic; ">abcdefghiABCDEFGH</div>
Interprétation du code de la règle @font-face{} CSS par votre navigateur.
.identifiant {font-family:'maFonte'}
abcdefghiABCDEFGH
.identifiant {font-family:'maFonte'; font-style : italic;}
abcdefghiABCDEFGH
.identifiant {font-family:'maFonteItalic'}
abcdefghiABCDEFGH
.identifiant {font-family : 'maFonteItalic'; font-style : italic;}
abcdefghiABCDEFGH
Interprétation normale du code de la règle CSS @font-face{} (copie d'écran).