任何人都可以指向一个描述url(点)含义的链接吗?

时间:2010-01-22 10:18:54

标签: css hyperlink

./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

2 个答案:

答案 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

相同

关于样式表和脚本,您可以将它放在任何地方

但加快网站速度的良好做法是

Put Stylesheets at the Top

Put Scripts at the Bottom

答案 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/fileinclude_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(...)中始终使用绝对路径。在“网络环境”中,它是最简单的风格。