In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to set the css file to utf-8. I hope you will get something after reading this article. Let's discuss it together.
In css, you can use the "@ charset" rule to set the character encoding to "utf-8", which specifies the character encoding used in the style file with the syntax "@ charset" UTF-8 ";"; the "@ charset" rule must be the first element in the stylesheet and must not be preceded by any characters.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
In css, you can use the "@ charset" rule to set the character encoding to "utf-8".
The @ charset attribute specifies the character encoding used in style files (.css suffixes) and can only be used in CSS files.
It must be the first element in the stylesheet and must not be preceded by any characters, not even comments.
If multiple @ charset rules are declared, only the first one will be used and cannot be used in the HTML element or in the HTML page, that is, not within the element.
Note: the @ charset rule cannot be used in character set-related elements of a HTML page.
After "@ charset", specify the name of the character encoding (in quotation marks), the syntax is:
@ charset "character set name"
Indicates that the character set name is case-sensitive, but for new stylesheets, it should always be UTF-8. It must be the name of the Web security character encoding defined in the IANA registry.
Example 1: the following @ charset declaration indicates that the stylesheet uses UTF-8 character encoding:
@ charset "UTF-8"
Example 2: the following list describes the wrong character set encoding:
@ charset 'iso-8859-15 UTF-8; / * uses the wrong reference style, so it is invalid * / @ charset UTF-8; / * because the character encoding name is not contained in quotation marks * / @ charset "UTF-8"; / * multiple spaces are not valid * / @ charset "UTF-8"; / * invalid, there is a character (space) before the rule * /
Note: if the special characters used in the stylesheet cannot be represented in the character encoding specified in the stylesheet, you can use character escape to escape the characters.
After reading this article, I believe you have a certain understanding of "how to set the css file to utf-8". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.