When I open the HTML file directly, the CSS files and images cannot be loaded, but when opened with VS Code, they load fine
P粉376738875
P粉376738875 2023-08-09 14:08:49
0
1
427
<p>When I try to open my HTML file with a direct click, it doesn't load the CSS file or image, but when I open it using VS code's live server, it works fine. Images and stylesheets are in separate files. </p> <p>This is the code: <code><link rel="stylesheet" href="/CSS files/stylesheet.css" type="text/css"> <meta charset="UTF-8"></code>< ;/p>
P粉376738875
P粉376738875

reply all(1)
P粉071743732

Try this answer https://stackoverflow.com/a/16643104/22147483. The href attribute in your code seems to use absolute paths.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template