<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="Keywords" content="关键词,关键字"><!--78个字以内-->
<meta name="description" content="描述信息"><!--介绍-->
<title></title>
<style type="text/css">
.top{width: 100%;height: 50px;background: #070700;}
.top.center{width:90%;height:50px;background:#ffff00;margin:0 auto;}
</style>
</head>
<body>
<div class="top">
<div class="center">
</div>
</div>
</body>
</html>
.top.center{width:90%;height:50px;background:#ffff00;margin:0 auto;}黄色色块的内容显示不出来
.top.center 连一起了 把两个class之间加个空格就好
<style type="text/css">
.top{width: 100%;height: 50px;background: #070700;}
.top .center{width:90%;height:50px;background:#ffff00;margin:0 auto;}
</style>
直接.center{width:90%;height:50px;background:#ffff00;margin:0 auto;}不带top
.top.center中间打个空格.top .center或者.top>.center
你div里什么都没有,连个文本都没有,你想显示什么
Ctrl + s保存一下