简体   繁体   中英

Why are my CSS files not linking to my HTML files?

I am currently facing a problem of not being able to link my CSS files to the HTML files that are located in the same folder. About a year ago, I did a project where I built a simple website using HTML and CSS. Now when I download the folder from my Google Drive and try to open the HTML file with Chrome, I see that the CSS effect is not applied. However, after going back to the folder to open and close the corresponding CSS file, when I try opening the HTML file again, then the CSS effect is shown. I have no idea why this is happening but does anyone have any idea? I have a folder called snappers and inside that folder, I have three different folders, one that stores HTML files, one that stores CSS files, and one that stores images used for the website.

根据您的文件夹结构,您必须向上一级目录才能访问 css 文件夹:

"../css-folder/css-file.css"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM