我下载了一个字体,在我的CSS中有:
@font-face {
font-family: "Gotham Medium";
src: url("Gotham/Gotham-Medium.otf");}
当我调用say in时
h1 { font-family:'Gotham Medium'}
字体显示与Gotham的外观不匹配。它也不是默认字体。
当下载到我的笔记本电脑中时,问题是不是某些内容被更改了?字体不在google API中,所以我不能尝试使用外部链接。
发布于 2017-11-17 15:59:56
你的Css应该是这样的:
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
为此,您可以使用font-face生成器,但您必须具有web字体的许可证
https://stackoverflow.com/questions/47340584
复制相似问题