Solution to Apache not loading the css file: 1. Delete the Chinese characters and use unicode instead; 2. Save the css file as utf-8 format; 3. Check the css path and open the browser to see if 404 is reported. Error; 4. Use chmod 777 css file to add read permission to the file.
The operating environment of this tutorial: Windows 7 system, HTML5&&CSS3 version, DELL G3 computer.
Recommended: css video tutorial
What should I do if apache does not load the css file?
apache may not load the css file for the following reasons:
There are Chinese characters in the css;
css is inconsistent with the page encoding;
css path error.
Apache does not have access rights to css files
The solution is as follows:
Method 1: Delete Chinese characters and use unicode instead
Method 2: Save the css file as utf-8 format, specify the page encoding
Method 3: Check the css path, open the browser to see if a 404 error is reported
Method 4: Use chmod 777 css file to add read permission to the file
The above is the detailed content of What to do if apache does not load css files. For more information, please follow other related articles on the PHP Chinese website!