【发布时间】:2018-04-17 11:34:52
【问题描述】:
我是 CSS 和 Font Awesome 世界的新手,在 primfaces atlas 主题中将我的 Font Awesome 从 4.4.0 更新到 5.0.10 时遇到问题,
这是个例外
Caused by: org.apache.el.parser.ParseException: Encountered " <ILLEGAL_CHARACTER> "\' "" at line 1, column 12.
Was expecting one of:
"{" ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<STRING_LITERAL> ...
"true" ...
"false" ...
"null" ...
"(" ...
"[" ...
"!" ...
"not" ...
"empty" ...
"-" ...
<IDENTIFIER> ...
<IDENTIFIER> ...
"(" ...
at org.apache.el.parser.ELParser.generateParseException(ELParser.java:3090)
还有我的
fa fa 图标工作正常,但不是 FAB、FAR 等新图标
我添加了从 fontAwesome 下载并替换为旧文件的文件, 并编辑了 font-awesome.css
@font-face {
font-family: 'Font Awesome 5 Brands';
font-style: normal;
font-weight: normal;
src: url("#{resource['atlas-layout:fonts/fa-brands-400.eot]}");
src: url("#{resource['atlas-layout:fonts/fa-brands-400.eot]}?#iefix") format("embedded-opentype"), url("#{resource['atlas-layout:fonts/fa-brands-400.woff2]}") format("woff2"), url("#{resource['atlas-layout:fonts/fa-brands-400.woff]}") format("woff"), url("#{resource['atlas-layout:fonts/fa-brands-400.ttf]}") format("truetype"), url("#{resource['atlas-layout:fonts/fa-brands-400.svg]}#fontawesome") format("svg"); }
.fab {
font-family: 'Font Awesome 5 Brands'; }
@font-face {
font-family: 'Font Awesome 5 Free';
font-style: normal;
font-weight: 400;
src: url("#{resource['atlas-layout:fonts/fa-regular-400.eot]}");
src: url("#{resource['atlas-layout:fonts/fa-regular-400.eot]}?#iefix") format("embedded-opentype"), url("#{resource['atlas-layout:fonts/fa-regular-400.woff2]}") format("woff2"), url("#{resource['atlas-layout:fonts/fa-regular-400.woff]}") format("woff"), url("#{resource['atlas-layout:fonts/fa-regular-400.ttf]}") format("truetype"), url("#{resource['atlas-layout:fonts/fa-regular-400.svg]}#fontawesome") format("svg"); }
.far {
font-family: 'Font Awesome 5 Free';
font-weight: 400; }
@font-face {
font-family: 'Font Awesome 5 Free';
font-style: normal;
font-weight: 900;
src: url("#{resource['atlas-layout:fonts/fa-solid-900.eot]}");
src: url("#{resource['atlas-layout:fonts/fa-solid-900.eot]}?#iefix") format("embedded-opentype"), url("#{resource['atlas-layout:fonts/fa-solid-900.woff2]}") format("woff2"), url("#{resource['atlas-layout:fonts/fa-solid-900.woff]}") format("woff"), url("#{resource['atlas-layout:fonts/fa-solid-900.ttf]}") format("truetype"), url("#{resource['atlas-layout:fonts/fa-solid-900.svg]}#fontawesome") format("svg"); }
.fa,
.fas {
font-family: 'Font Awesome 5 Free';
font-weight: 900; }
请帮忙
【问题讨论】:
-
这个 PrimeFaces 有什么关系?您更新了什么以及如何更新?
-
@Kukeltje 我更新了我的代码,就像我是如何做到的那样
标签: css primefaces el font-awesome-5