gpt4 book ai didi

css - 部署在服务器上时,Primeng 图标未出现在 IE11 中

转载 作者:行者123 更新时间:2023-11-28 19:29:55 25 4
gpt4 key购买 nike

我正在做一个 Angular 元素,并为许多组件使用 PrimeNg。

该元素在所有浏览器(IE11、Chrome)中本地运行时运行良好。但是当我在服务器 (linux) 上部署元素时,primeng 图标没有被渲染。

我做了一些研究,似乎在 primeng css 文件(见下文)中定义的 CSS 实体没有在服务器上的 IE11 中加载。

.pi-exclamation-triangle:before {
content: "\e922";
}

.pi-calendar:before {
content: "\e927";
}

我在 Index.html 中添加了这一行

<meta http-equiv="X-UA-Compatible" content="ie=edge">

还更新了 polyfills.ts

** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/set';

如有任何建议,我们将不胜感激。

最佳答案

我看到您提到“primeng css 文件(见下文)未在服务器上的 IE11 中加载”。

我在以下 thread - Github 中找到了一些解决方法或建议

  1. 请检查另一台机器或重置 IE 设置以及组策略限制。

  2. 检查您的 IE 安全设​​置,它必须允许/启用要下载的字体。

enter image description here

希望对您有所帮助,

关于css - 部署在服务器上时,Primeng 图标未出现在 IE11 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55275050/

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