“./"是什么意思?(点斜线)是指 HTML 文件路径位置?

“./

问题描述:

我知道 ../ 的意思是走一条路径,但是 ./ 到底是什么意思?

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?

./working 文件所在的文件夹:

./ is the the folder that the working file is in:

所以在/index.htm./就是根目录
但在 /css/style.css./ 是 css 文件夹.

So in /index.htm ./ is the root directory
but in /css/style.css ./ is the css folder.

记住这一点很重要,因为如果你将 CSS 从 /index.htm 移动到 /css/style.css 路径将会改变.

This is important to remember because if you move CSS from /index.htm to /css/style.css the path will change.