字体不会在任何版本的 Internet Explorer 上加载
Font will not load on any version of Internet Explorer
我有两种字体想要包含在我的网站上用于我的徽标,Bebas Neue Regular 和 Bebas Neue Thin。
我使用 font-squirrels 在线字体转换工具转换了我的字体,并将相关的@font-face 代码添加到我的 css:
@font-face {
font-family: BebasNeueReg;
src: url("/fonts/BebasNeueRegular.eot");
src: url("/fonts/BebasNeueRegular.eot?#iefix") format('embedded-opentype'),
url("/fonts/BebasNeueRegular.woff2") format('woff2'),
url("/fonts/BebasNeueRegular.woff") format('woff'),
url("/fonts/BebasNeueRegular.ttf") format('truetype'),
url("/fonts/BebasNeueRegular.svg") format('svg');
}
如您所见,这是 Bebas Neue Regular 的@font-face css。由于某些奇怪的原因,Bebas Neue Thin 的 css @font-face 在所有浏览器中都可以正常工作。这个 css 除了 src 不同之外完全一样。
@font-face {
font-family: BebasNeueThin;
src: url("/fonts/BebasNeueThin.eot");
src: url("/fonts/BebasNeueThin.eot?#iefix") format('embedded-opentype'),
url("/fonts/BebasNeueThin.woff2") format('woff2'),
url("/fonts/BebasNeueThin.woff") format('woff'),
url("/fonts/BebasNeueThin.ttf") format('truetype'),
url("/fonts/BebasNeueThin.svg") format('svg');
}
我尝试了多种方法,例如,使用不同的字体转换工具转换字体,交换 url 的顺序。
任何人都可以阐明一下吗?以前有人遇到过完全相同的问题吗?
提前致谢。
我清除了所有内容并重新开始。下载我想成为项目一部分的字体,然后使用网络字体生成器将它们转换为网络字体。然后我将它们添加回项目并使用压缩文件中的 CSS @font-face。这似乎有固定的东西。可能是我一开始尝试转换的损坏的开放式字体。
我有两种字体想要包含在我的网站上用于我的徽标,Bebas Neue Regular 和 Bebas Neue Thin。
我使用 font-squirrels 在线字体转换工具转换了我的字体,并将相关的@font-face 代码添加到我的 css:
@font-face {
font-family: BebasNeueReg;
src: url("/fonts/BebasNeueRegular.eot");
src: url("/fonts/BebasNeueRegular.eot?#iefix") format('embedded-opentype'),
url("/fonts/BebasNeueRegular.woff2") format('woff2'),
url("/fonts/BebasNeueRegular.woff") format('woff'),
url("/fonts/BebasNeueRegular.ttf") format('truetype'),
url("/fonts/BebasNeueRegular.svg") format('svg');
}
如您所见,这是 Bebas Neue Regular 的@font-face css。由于某些奇怪的原因,Bebas Neue Thin 的 css @font-face 在所有浏览器中都可以正常工作。这个 css 除了 src 不同之外完全一样。
@font-face {
font-family: BebasNeueThin;
src: url("/fonts/BebasNeueThin.eot");
src: url("/fonts/BebasNeueThin.eot?#iefix") format('embedded-opentype'),
url("/fonts/BebasNeueThin.woff2") format('woff2'),
url("/fonts/BebasNeueThin.woff") format('woff'),
url("/fonts/BebasNeueThin.ttf") format('truetype'),
url("/fonts/BebasNeueThin.svg") format('svg');
}
我尝试了多种方法,例如,使用不同的字体转换工具转换字体,交换 url 的顺序。
任何人都可以阐明一下吗?以前有人遇到过完全相同的问题吗?
提前致谢。
我清除了所有内容并重新开始。下载我想成为项目一部分的字体,然后使用网络字体生成器将它们转换为网络字体。然后我将它们添加回项目并使用压缩文件中的 CSS @font-face。这似乎有固定的东西。可能是我一开始尝试转换的损坏的开放式字体。