4 回答
Probably the text encodings (character sets) for your CSS and HTML files do not agree.
To set a stylesheet's encoding, use @charset
; for example:
@charset "UTF-8";
To set an HTML page's encoding, use a <meta>
tag (in the <head>
section at the top); for example:
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
or in HTML 5:
<meta charset="UTF-8">
The @charset
of a stylesheet must agree with the encoding chosen for its HTML page.
The reason is that the BLACK STAR “★” (U+2605) appears as UTF-8 encoded in the source that contains the CSS code, but that source is being interpreted as ISO-8859-1 encoded. The fix depends on where the CSS code is, on the server software, etc.
You can also specify it in its hexadecimal value, without adding the character encoding declaration.
Instead of:
content: '★';
it should be:
content: '\2605';
You can look it up here:
In the slick-theme.css file i had : @charset 'UTF-8'
, the single quote marks where the problem , i changed them to double quotes like so : @charset "UTF-8"
. And it worked