我开始创建一个简单的静态 HTML 网站,但我意识到,出于某种原因,它没有显示任何 css 样式。起初我认为这是一个链接问题,但后来我意识到即使在 HTML 文件中样式属性也不起作用。这是一个简单的例子:
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="../style.css">
<meta charset="utf-8" />
</head>
<body>
<p style="text-decoration: underlined;">This is my body green</p>
<p>This is my body </p>
<p>This is my body </p>
<p>This is my body </p>
<p>This is my body </p>
<p>This is my body </p>
<p>This is my body </p>
<p>This is my body </p>
<p>This is my body </p>
<p>This is my body </p>
</body>
和样式表:
body {
background: #c9c9c9;
}
有什么建议吗?