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.