5
4

2 に答える 2

8

While setting the correct encoding is always a good thing to do, I try to avoid this situation entirely and use only ASCII characters in HTML, JavaScript and CSS:

content:"\2014"

Unicode characters are represented by \hexValue in CSS.

Beware that if the following character is 0-9 or a-f (or A-F), it will be considered part of the unicode character. You can put a space after it: "\2014 stuff", and the space won't be displayed (it just marks the end of the character). To actually put a space after it, use two spaces.

于 2013-09-26T21:09:09.910 に答える
3

スタイルシートの上に以下を追加してみてください

@charset "UTF-8";

HTTP サーバー (Apache、Nginx など) が別の文字セットを指定している可能性があります。次のように応答する必要があります。

Content-Type: text/css; charset=UTF-8

詳細については、http://www.w3.org/を参照してください。

于 2013-09-26T21:07:10.467 に答える