1. Description
We developed a back-end tool system, but in phase 2, we found that there was no format problem on some machines, and all the formats were lost; the page in phase 1 was completely normal ~
2. causes and solutions
At the beginning, I was puzzled; I did not have any valuable information when I searched the internet;
In Phase 1 of comparison, we put some common page headers in head. jsp and include them using the include method;
The include method may be suitable for the loss of CSS files, but this problem usually occurs when the contained page and CSS are not in the same root directory, all webpages in the system are placed under the same directory. I added CSS inclusion on the home page, but it was not solved;
Today I re-read the CSS and found that there is a red symbol in the braces in the system, it seems a bit wrong? I modified it, removed the error, saved it, and tried again. I found it was normal ~~
3. Thinking
This error is relatively concealed, because it is completely normal in most browsers, but sometimes several people may encounter errors, which may be related to the fault tolerance and compatibility of their browser versions;
In addition, the include method is used to cover up some of the root causes. When the CSS file is locally edited, no error is reported. However, when it is uploaded to the server, a red character is displayed, it seems that there is still a problem;
Sometimes the CSS format is lost. Check whether the CSS file is incorrectly formatted.