What does quot;./quot; (dot slash) refer to in terms of an HTML file path location?(“./是什么意思?(点斜杠)指的是 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.
这篇关于“./"是什么意思?(点斜杠)指的是 HTML 文件路径位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“./"是什么意思?(点斜杠)指的是 HTML 文件路径位置?
- 使用 iframe URL 的 jQuery UI 对话框 2022-01-01
- 我不能使用 json 使用 react 向我的 web api 发出 Post 请求 2022-01-01
- 如何调试 CSS/Javascript 悬停问题 2022-01-01
- 为什么我的页面无法在 Github 上加载? 2022-01-01
- 是否可以将标志传递给 Gulp 以使其以不同的方式 2022-01-01
- 如何向 ipc 渲染器发送添加回调 2022-01-01
- 在不使用循环的情况下查找数字数组中的一项 2022-01-01
- 如何显示带有换行符的文本标签? 2022-01-01
- 为什么悬停在委托事件处理程序中不起作用? 2022-01-01
- 从原点悬停时触发 translateY() 2022-01-01
