./ ../ / in the url\src path address

One: Concise and concise

"./" represents where the file is located

"../" represents the horizontal hierarchy of the folder where the file is located

"/" represents where the root directory is located

not understand? last case

Two cases

The file path problem in the above table . html file for demonstration

1 How to import 666.css file in file path problem.html

 Either way works

./ represents the location of the file, and the actual function of ./666.css is the same as that of 666.css

2 How to introduce the file path problem.css file in the file path problem.html

 Explanation: There will be a problem with the file path, because the file is nested in the file. It can be imagined that a hierarchical relationship is formed between files, and the file path problem.html is the lowest-level file. ../ rises to the BOM folder level, and another ../ rises to the JS folder level. That's enough, and then use / to find the file.

2 How to introduce file path problem 2.css file in file path problem.html

Guess you like

Origin blog.csdn.net/qq_67896626/article/details/128331030