The following discussion takes place in an HTML environment:
A path refers to the location where a file is stored. There are two ways to express a path: relative path and absolute path.
1. Relative path
/ : indicates the root directory of the file
./ : represents the directory where the file is currently located.
. / : indicates the parent directory of the file
. /.. / : indicates the parent directory of the file’s parent directory
For example:
If you want to introduce 000.css in test.html under the HTML folder, you can write it as follows:
< link href = "/ CSS/css1/000. The CSS" / > (. / can be omitted) < link href = "/ HTML/CSS/css1/000. CSS" / > (/ is actually within the project root directory) < link href = ".. /html/css/css1/000.css"/>Copy the code
2. Absolute paths
Absolute path refers to the complete url, assuming project website domain name at www.quanbaike.com, then 1. CSS absolute path should be www.quanbaike.com/html/css/cs…
The original link cloud.tencent.com/developer/a…