0

我是 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; }

请帮忙

4

1 回答 1

0

该错误似乎是完全正确的。在每个_

#{resource['atlas-layout:fonts/fa-brands-400.eot]}

您在 [ 之后有一个“打开”引号,但在 ] 之前没有一个“结束”引号。当您与原始的 PrimeFaces进行比较时,很容易找到。

于 2018-04-17T12:40:34.880 回答