<tfoot id='N11W9'></tfoot>
<i id='N11W9'><tr id='N11W9'><dt id='N11W9'><q id='N11W9'><span id='N11W9'><b id='N11W9'><form id='N11W9'><ins id='N11W9'></ins><ul id='N11W9'></ul><sub id='N11W9'></sub></form><legend id='N11W9'></legend><bdo id='N11W9'><pre id='N11W9'><center id='N11W9'></center></pre></bdo></b><th id='N11W9'></th></span></q></dt></tr></i><div id='N11W9'><tfoot id='N11W9'></tfoot><dl id='N11W9'><fieldset id='N11W9'></fieldset></dl></div>

    • <bdo id='N11W9'></bdo><ul id='N11W9'></ul>

      <small id='N11W9'></small><noframes id='N11W9'>

    1. <legend id='N11W9'><style id='N11W9'><dir id='N11W9'><q id='N11W9'></q></dir></style></legend>

    2. (HTML) 在其他文件夹中链接 CSS 样式表但同一目录不起作用

      (HTML) linked CSS stylesheet in other folder but same directory doesn#39;t work((HTML) 在其他文件夹中链接 CSS 样式表但同一目录不起作用)
      <legend id='esLHR'><style id='esLHR'><dir id='esLHR'><q id='esLHR'></q></dir></style></legend>
        • <bdo id='esLHR'></bdo><ul id='esLHR'></ul>

          <tfoot id='esLHR'></tfoot>

            <small id='esLHR'></small><noframes id='esLHR'>

                <tbody id='esLHR'></tbody>

                <i id='esLHR'><tr id='esLHR'><dt id='esLHR'><q id='esLHR'><span id='esLHR'><b id='esLHR'><form id='esLHR'><ins id='esLHR'></ins><ul id='esLHR'></ul><sub id='esLHR'></sub></form><legend id='esLHR'></legend><bdo id='esLHR'><pre id='esLHR'><center id='esLHR'></center></pre></bdo></b><th id='esLHR'></th></span></q></dt></tr></i><div id='esLHR'><tfoot id='esLHR'></tfoot><dl id='esLHR'><fieldset id='esLHR'></fieldset></dl></div>
              1. 本文介绍了(HTML) 在其他文件夹中链接 CSS 样式表但同一目录不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我是一个初学者,正在尝试创建一个网站并将 CSS 样式表存储在与 HTML 文件不同的文件夹中,但在同一目录中.

                I am a total beginner and am trying to create a website and store the CSS stylesheet in a different folder that the HTML files, but in the same directory.

                我把它放在我的 HTML 的标题标签中:

                I put this in the header tag of my HTML:

                <link rel="stylesheet" type="text/css" media="screen" href="./style/stylesheet.css" />
                

                但它不起作用.

                该文件与我的 HTML 位于同一目录中的style"文件夹中.

                The file is in the folder "style" in the same directory as my HTML.

                当我将 CSS 文件和 HTML 文件放在同一个文件夹中并以相同的方式链接到它时,它可以工作href="stylesheet.css"

                It works, when I have the CSS file and the HTML file in the same folder and link to it in the same way with href="stylesheet.css"

                我已经寻找其他修复程序,检查了拼写错误,但它似乎已经正确链接了?我也尝试了不同的方法来键入路径,但没有任何效果.

                I have looked for other fixes, checked for typos, but it seems to be linked correctly already? I have also tried around different ways to type the path, but nothing works.

                这是文件夹的结构方式:

                This is the way the folders are structured:

                推荐答案

                该文件与我的 HTML 位于同一目录中的style"文件夹中.

                The file is in the folder "style" in the same directory as my HTML.

                不,不是.

                图像显示 HTML 位于名为 LoggedIn 的文件夹中,CSS 位于名为 style 的文件夹中,但 stylenotLoggedIn 内.它是 LoggedIn 的同级目录,而不是它的子目录.

                The image shows that the HTML is in a folder named LoggedIn, and the CSS is in a folder called style but style is not inside LoggedIn. It is a sibling directory of LoggedIn not a subdirectory of it.

                所以在进入style之前,你需要上一层楼.

                So you need to go up a level before you go down into style.

                ./(当前目录)替换为 ../(父目录).

                Replace ./ (the current directory) with ../ (the parent directory).

                这篇关于(HTML) 在其他文件夹中链接 CSS 样式表但同一目录不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Embed YouTube video - Refused to display in a frame because it set #39;X-Frame-Options#39; to #39;SAMEORIGIN#39;(嵌入 YouTube 视频 - 拒绝显示在框架中,因为它将“X-Frame-Options设置为“SAMEORIGIN)
                Stop embedded youtube iframe?(停止嵌入 youtube iframe?)
                YouTube iframe API: how do I control an iframe player that#39;s already in the HTML?(YouTube iframe API:如何控制 HTML 中已有的 iframe 播放器?)
                Switch/toggle div (jQuery)(切换/切换 div (jQuery))
                Apply jquery (mobile) css classes programatically after rendering has occurred(呈现后以编程方式应用 jquery (mobile) css 类)
                How to avoid name clashes in JavaScript widgets(如何避免 JavaScript 小部件中的名称冲突)

                1. <tfoot id='7QB4n'></tfoot>
                2. <small id='7QB4n'></small><noframes id='7QB4n'>

                  <legend id='7QB4n'><style id='7QB4n'><dir id='7QB4n'><q id='7QB4n'></q></dir></style></legend>

                    <i id='7QB4n'><tr id='7QB4n'><dt id='7QB4n'><q id='7QB4n'><span id='7QB4n'><b id='7QB4n'><form id='7QB4n'><ins id='7QB4n'></ins><ul id='7QB4n'></ul><sub id='7QB4n'></sub></form><legend id='7QB4n'></legend><bdo id='7QB4n'><pre id='7QB4n'><center id='7QB4n'></center></pre></bdo></b><th id='7QB4n'></th></span></q></dt></tr></i><div id='7QB4n'><tfoot id='7QB4n'></tfoot><dl id='7QB4n'><fieldset id='7QB4n'></fieldset></dl></div>

                        <tbody id='7QB4n'></tbody>
                          <bdo id='7QB4n'></bdo><ul id='7QB4n'></ul>