实际上我在字体文件夹中有三个文件。这些是Gotham-Bold.ttf
, Gotham-Medium.ttf
, Gotham-Thin.ttf
..... 所以我需要@font-face
为这三种类型使用三次。请任何人帮助我。
我目前使用的代码如下:
@font-face {
font-family: 'Gotham';
src: url('fonts/Gotham-Bold.eot'); /* IE9 Compat Modes */
src: url('fonts/Gotham-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/Gotham-Bold.woff') format('woff'), /* Modern Browsers */
url('fonts/Gotham-Bold.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/Gotham-Bold.svg#svgFontName') format('svg'); /* Legacy iOS */
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Gotham';
src: url("/fonts/Gotham-Bold.eot");
}
@font-face {
font-family: 'Gotham';
src: url("/fonts/Gotham-Bold.woff") format("woff");
}
谢谢。