How to set encoding in css

醉折花枝作酒筹
Release: 2023-01-05 16:10:26
Original
3245 people have browsed it

In CSS, you can use the "@charset" rule for character encoding. You only need to set "@charset "Character Encoding"" at the top of the CSS file. The "@charset" rule specifies the character encoding used in the style sheet and must be the first element in the style sheet and cannot start with any character.

How to set encoding in css

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

At the top of the external css file, write the following code: @charset "UTF-8";

@charset CSS @Rule Specifies the character encoding used in the style sheet. It must be the first element in the stylesheet and must not be preceded by any characters. Because it is not a nested statement, it cannot be used in a @rule condition group. If multiple @charset @rules are declared, only the first one will be used, and it cannot be used within the style attribute within the HTML element or the character set-related