gpt4 book ai didi

html - css font-family 在 Internet Explorer 上不起作用

转载 作者:行者123 更新时间:2023-11-28 07:45:52 24 4
gpt4 key购买 nike

CMS:Magento 社区(我认为这不重要)。

我使用的是我在 fontsquirrel 上加载的字体。在 Firefox 上看起来不错,但在 Internet Explorer (11) 上,此字体仅适用于某些没有逻辑的元素。

这是一个示例页面:http://www.prodottipet.simply-webspace.it/index.php/roditori.html菜单上的“Cani - Roditori - Gatti - Pesci - Uccelli”就是一个例子。

1) 如果字体没有正确加载,为什么有些元素使用这种字体?所以我不认为这是问题所在。

@font-face {
font-family: 'indy';
src: url('w/indiepimptbs-webfont.eot');
src: url('w/indiepimptbs-webfont.eot?#iefix') format('embedded-opentype'),
url('w/indiepimptbs-webfont.woff2') format('woff2'),
url('w/indiepimptbs-webfont.woff') format('woff'),
url('w/indiepimptbs-webfont.ttf') format('truetype'),
url('w/indiepimptbs-webfont.svg#indy_pimpregular') format('svg');

font-weight: normal;
font-style: normal;
}

最佳答案

检查你的 html,你有嵌入样式 font-family:, serif !important,这是无效的,我想除了 IE 之外的浏览器会忽略它11. 将其删除即可。

您可以通过运行 IE Inspector (F12) 来跟踪 css 继承。在那里你会看到:

enter image description here

嵌入式/内部 css 优先于外部样式表。

关于html - css font-family 在 Internet Explorer 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30698515/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com