The method found online works
The footer and header files introduced with include have an extra blank line on it, which greatly affects the beauty. It's fine to put the imported files directly.
Later I thought that I had been using Gb2312 encoding before, but this time I used Utf-8, which is probably related to this.
Many say it may be due to css padding settings, etc., but I'm not. Finally, it was discovered that it was caused by the Unicode signature (bom).
Specific modification method : Open footer or header, then click Modify in Dreamweaver, select page properties, title/encoding, and cancel the checkmark including unicode signature (bom).