的CSS样式在<ul>外部工作表中不起作用,但在内部工作



我在CSS样式方面遇到了一个奇怪的问题。虽然同一图纸中的其他样式可以使用,但此样式不起作用。我检查了外部工作表的路径,它是可以的,然后我在内部工作表中放入了ul{}样式代码,它也很好。

This is html code: 
<!DOCTYPE html>
<html lang= "cs-cz">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mr. Chapadlákovo podvodní království</title>
<link rel="stylesheet" type="text/css" href="css/layout.css">
<link rel="stylesheet" type="text/css" href="css/textstyle.css">
</head>
<body>
<!--NAVBAR-->   
<ul>
<li><a href="#Lorem" id="fontNavbar">Království</a></li>
<li><a href="#lorem" id="fontNavbar">LOREM</a></li>
<li><a href="#lorem" id="fontNavbar">LOREM</a></li>
<li><a href="#lorem" id="fontNavbar">LOREM</a></li>
<li><a href="#lorem" id="fontNavbar">LOREM</a></li>
<li><a href="#Kontakt" id="fontNavbar">Kontakt</a></li>
</ul>
</body>

我把它切到最大值,看看是否有东西碰撞:

body {
background-color: rgb(20, 20, 20);
background-attachment: scroll;
};
ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: row;
};
li a {
display: inline-block;
width: 7vw;
};

在css文件中删除";">

body {
background-color: rgb(20, 20, 20);
background-attachment: scroll;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: row;
}
li a {
display: inline-block;
width: 7vw;
}

最新更新