css absolute path is written like "http://localhost/site/App_Themes/image/leaf.jpg". The absolute path refers to the absolute location in the directory and reaches the target location directly, usually from the drive letter. The starting path.
The operating environment of this tutorial: windows7 system, css3 version, Dell G3 computer.
Recommended:css video tutorial
The path refers to the location where the file is stored. You can use the path to reference files, insert images, videos, etc. in the web page. There are two ways to represent paths: relative paths and absolute paths.
How to write the absolute path of css?
Absolute path refers to the complete URL.
Suppose you create a new asp.net site through the virtual directory, and the name is site
, then your site access path is http://localhost/site/
Taking your directory structure as an example, your css can be written like this
background:url(http://localhost/site/App_Themes/image/leaf.jpg)
Absolute path introduction
The absolute path refers to the absolute location under the directory, directly reaching the target location, usually from the drive letter The starting path.
The path that completely describes the file location is the absolute path, which is the directory path based on the root directory of the web site. The absolute path name is specified from the root directory at the top of the tree directory structure to a directory or file. It consists of a series of consecutive directories separated by slashes until the directory or file to be specified. The last name is the directory or file to point to. The reason why it is called absolute means that when all web pages reference the same file, the path used is the same.
The above is the detailed content of How to write css absolute path. For more information, please follow other related articles on the PHP Chinese website!