什么是“./&” (点斜线)是指HTML文件路径位置? [英] What does "./" (dot slash) refer to in terms of an HTML file path location?
问题描述
我知道 ../
意味着走上一条路,但是 ./
意味着什么?
我最近正在阅读一个教程,它似乎只是指一个文件在同一个位置,所以它有必要吗?我可以不使用它,如果这是它所做的一切吗?
./
是工作文件所在的文件夹:
因此,在 /index.htm
./
是根目录
,但是在 /css/style.css
./
是css文件夹。
这一点很重要,因为如果将CSS从 /index.htm
到 /css/style.css
路径将会改变。
I know ../
means go up a path, but what does ./
mean exactly?
I was recently going through a tutorial and it seems to be referring to just a file in the same location, so is it necessary at all? Can I just not use it if that's all it's doing?
./
is the the folder that the working file is in:
So in /index.htm
./
is the root directory
but in /css/style.css
./
is the css folder.
This is important to remember because if you move CSS from /index.htm
to /css/style.css
the path will change.
这篇关于什么是“./&” (点斜线)是指HTML文件路径位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!