How to write css absolute path

藏色散人
Release: 2022-12-30 11:11:48
Original
3395 people have browsed it

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.

How to write css absolute 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)
Copy after login

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!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!