Html 无法将css链接到文档,错误?

Html 无法将css链接到文档,错误?,html,css,Html,Css,您好,我五个浏览器中有三个无法将css文件链接到我的index.html?它只在internetexplorer/edge中工作,这很奇怪。如果我改为做一个样式标签,它对所有浏览器都有效,但我想把它链接到一个文件!!!下面是我的代码和浏览器的截图 <html> <head> <title>Test Page</title> <link rel="stylesheet" type="text/css" href="main.cs

您好,我五个浏览器中有三个无法将
css
文件链接到我的
index.html
?它只在
internetexplorer/edge
中工作,这很奇怪。如果我改为做一个样式标签,它对所有浏览器都有效,但我想把它链接到一个文件!!!下面是我的代码和浏览器的截图

<html>
<head>
    <title>Test Page</title>
    <link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
    <header>
        xd
    </header>
    <nav>
        xd
    </nav>
    <section>
        xd
    </section>
    <aside>
        xd
    </aside>
    <footer>
        xd
    </footer>
</body>
</html>


试着检查一下你的html安装文件夹,有时我会遇到这个问题,我看到一些不应该在那里的东西。并非每次都有用,但有时确实有用。:)

你在devtools中看到了什么?例如,在chrome中,我在Sorces中看到了包含所有it内容的外部文件。你在console&network选项卡中看到了什么?console和network idk中没有任何内容。我猜这只会发生在一个特定CSS文件或任意CSS文件中吗?好的,html文件夹位于哪里?可能在system32或???中,对每个人来说都不一样,如果你不记得你选择的位置,试着重新安装并为你的小文件夹选择一个好位置。这是胡说八道。HTML不是已安装的程序。这是一种文档格式。
*{
    margin: 0;
    border: 0;
    padding: 0;
}
body { 
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #707070;
    flex-grow: 1;
}

nav {
    background-color: #C9BFBF;
    flex-grow: 1;
}

section {
    background-color: #ABABAB;
    flex-grow: 1;
}

aside {
    background-color: #C9C9C9;
    flex-grow: 1;
}

footer {
    background-color: #707070;
    flex-grow: 1;
}