您好我无法在5个浏览器中的3个中将css
文件链接到我的index.html
吗?非常奇怪的是它只适用于internet explorer/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>
*{
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;
}
答案 0 :(得分:-3)
尝试检查你的html安装文件夹,有时候我有这个问题,我看到一些不应该在那里的东西。每次都没有帮助,但有时却有所帮助。 :)