Problem and Solution of failure to load Css files

Source: Internet
Author: User

Problem description: During the webpage creation process yesterday, the webpage was still good, and suddenly it was "streaking". I started to think of the Code to block the css. I searched for it for a long time, I did not find any problem. I found a solution on the Internet. I had a wrong answer on the Internet. After a long time, I finally understood it.

Problem summary: when using dw to create a webpage, create a css file. The css file has an initial Code (Code: @ charset "UTF-8";), and my usual habit is, right-click and select "New Text Document. change the txt file. html document. Therefore, the css document encoding type is often not specified, so the browser is "streaking ".

Another drawback of using "New Text Document" to create a web page: I installed notpad2 (Notepad 2.0) on my computer and used notpad2 to create a text document, its default encoding format is UTF-8. Opening such Chinese documents in Notepad can be displayed normally. However, if you open the file in a browser, garbled characters will appear, even if you declare that the encoding is GB2312 in the html document, you cannot do it. You must change the encoding format to ANSI encoding (in the Chinese operating system, ANSI encoding refers to simplified Chinese.

Solution: Try to use software to create a webpage document. If there are no conditions, please note that the Chinese document encoding must be ANSI and the css file Declaration (@ charset "UTF-8 ";), yes.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.