从父文件夹链接样式表 [英] Link stylesheet from a parent folder
本文介绍了从父文件夹链接样式表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我具有以下文件夹设置:
I have the following folder setup:
Main
css
stylesheet.css
sub
example
index.php
index.php
如何在 example
中为 index.php
文件链接 stylesheet.css
?
< link rel ="stylesheet" type ="text/css" href ="css/stylesheet.css">
这仅适用于主要"部分中的 index.php
.
This only works for index.php
in the Main section.
推荐答案
您可以像这样返回两个目录: ../../
You can go two directories back like this: ../../
../
用于填充相对路径结构.
../
is used to fill the relative path structure.
<link rel="stylesheet" type="text/css" href="../../css/stylesheet.css">
这篇关于从父文件夹链接样式表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文