./CoverFlows_files/coverflow.js
是什么意思?
我理解../CoverFlows_files/coverflow.js
表示[向上移动一个目录]
/CoverFlows_files/coverflow.js
表示[从此处下载]
还有办法在asp.net中找到它的~/
...?
我不太明白的另一件事是放在哪里
<link rel="stylesheet" type="text/css" href="CoverFlows_files/coverflow.css">
和
<SCRIPT type="text/javascript" src="./CoverFlows_files/coverflow.js"></SCRIPT>
这两个标签是否必须进入头部或身体内部,还是无关紧要?
我想如果任何人都有一个指向网页的链接,这些网页会覆盖这些基本主题,这些主题非常有用。
此致 PQ
答案 0 :(得分:4)
./
表示当前目录
CoverFlows_files/coverflow.css
和./CoverFlows_files/coverflow.css
基本相同
/CoverFlows_files/coverflow.css
是域名
示例http://yoursite.com/CoverFlows_files/coverflow.css
与/CoverFlows_files/coverflow.css
关于样式表和脚本,您可以将它放在任何地方
但加快网站速度的良好做法是
答案 1 :(得分:2)
路径不仅仅用在“网络环境”中,所以我会尝试进一步解释它。
(我将使用以下语法:where we are
+ what path we type
= what's the absolute path
)
./path/to/file
仅在当前字典中搜索:
/home/crozin
+ ./path/to/file
= /home/crozin/path/to/file
http://blah.com/support/
+ ./path/to/file
= http://blah.com/support/path/to/file
/path/to/file
是绝对路径:
/home/crozin
+ /path/to/file
= /path/to/file
http://blah.com/support/
+ /path/to/file
= http://blah.com/path/to/file
path/to/file
在include_path
(OS变量)的每个目录中搜索。因此,如果include_path
设置为:.;/home/crozin;/tmp
,则会搜索:
/home/crozin
+ path/to/file
= ./path/to/file
和/home/crozin/path/to/file
以及/tmp/path/to/file
http://blah.com/support/
+ path/to/file
= http://blah.com/support/path/to/file
(与第一个示例基本相同)在...: url(...)
中始终使用绝对路径。在“网络环境”中,它是最简单的风格。