<分区>
<分区>
所以,我真的是 CSS 菜鸟,因为我只用过 1 到 2 次。当我尝试更改正文的背景颜色时,它根本没有改变。
这是我的 HTML 代码:
<DOCTYPE! html>
<html>
<head>
<link rel = "stylesheet" src = "CSS/main.css">
<title>
TESTTITLE
</title>
</head>
<body>
<h1>TEST</h1>
</body>
</html>
这是 CSS:
body {
background-color : aliceblue;
}
我知道这很简单,但我真的是整个前端领域的初学者。
最佳答案
你误用了 src
。
CSS
<link rel="stylesheet" type="text/css" href="css/main.css">
关于html - CSS 背景颜色不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39354214/