[英]How can I solve the body property to display color in CSS for Codepen?
I'm trying to add color in the body property of my CSS in Codepen.我正在尝试在 Codepen 的 CSS 的 body 属性中添加颜色。 Have not added anything but the title to the webpage, but it does not changes color regardless of where I put the tag.
除了网页的标题外,没有添加任何内容,但无论我将标签放在哪里,它都不会改变颜色。 Tried to place the
<body>
html tag before <head>
, erased <main>
, still no change.尝试将
<body>
html 标签放在<head>
之前,删除<main>
,仍然没有变化。
<!DOCTYPE html>
<html>
<head>
<title>Project Survey Form</title>
</head>
<body id="body">
<main>
<h1 id="title">Survey Form</h1>
</main>
</body>
</html>
<style>
body {
background-color: blue;
}
</style>
It keeps displaying the white background.它一直显示白色背景。 Do you know of any workaround for this?
你知道有什么解决方法吗?
Codepen at CSS section , you don't need style tag Codepen 在CSS 部分,你不需要样式标签
<style>
body {
background-color: blue;
}
</style>
to到
body {
background-color: blue;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.