Relative path to the file Detailed

 Hierarchical relationship relative path

   Use the same directory: ./ or write nothing

    Parent directory with: ../

    Lower directory with: directory name /

     Root directory :/

 

 Absolute path to the root directory ~ / server path

Relative path ../ client route

  eg: web below index.html

                             css (folder): index1.html, main.css

                             files (folder): index2.html

  cited in the main.css index.html (lower directory) path css / main.css

  index1.html cited main.css (same directory) path is main.css

  index2.html cited in the main.css (different documents cited in the folder) path ../css/main.css

Guess you like

Origin www.cnblogs.com/peteremperor/p/11777426.html