您的位置:首页技术文章
文章详情页

请问一下用notepad++可以照着你这样来编吗?为什么我用notepad++编辑的时候那个容器那里颜色是黑的,不会像其他变量那样变颜色。

【字号: 日期:2022-06-22 17:11:27浏览:88作者:猪猪

问题描述

<!DOCTYPE html>

<html>

<body>

<head>

<title>汽车在线租赁</title>

<meta charset=utf-8 />

<style type="text/css">

.container{

max-width:960px;

margin:0 auto

</style>

</head>

<div class="container">

<div class="header"></div>

<div class="main"></div>

<div class="footer"></div>

</body>

</div>

</html>

问题解答

回答1:

<style type="text/css"> .container{ max-width:960px; margin:0 auto </style>

看代码, 你没有设置.container的背景色, 也没有将这个类样式闭合