Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
172 views
in Technique[技术] by (71.8m points)

css - How to go back to directory in html?

How to go back to the directory in html. Firstly I will show by folders.

My website
├ Pages (folder name)
│  └ about-us.html
├ Css (folder name)
│  └ Style.css
└ index.html

Let us assume that we are working on about-us.html. Now I want to connect style.css to about-us.html. If anyone know the answer thanks in advance.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You mean

<link href="../Css/a.Style.css" rel="stylesheet" /> 

in a.about-us.html and

<link href="Css/a.Style.css" rel="stylesheet" /> 

in index.html

You can do absolute in both html files:

<link href="/Pages/Css/a.Style.css" rel="stylesheet" /> 

or if Pages is the root folder:

<link href="/Css/a.Style.css" rel="stylesheet" /> 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...