為什么背景色沒(méi)有顯示?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無(wú)標(biāo)題文檔</title>
<style type="text/css">
*
{
? ? padding:0;
margin:0;
}
.mainbox{
? ? width:960px;
??
? ? background-color:#CFF;
? ? overflow:visible;
? ?
? ? }
.lefebox{
width:740px;
height:300px;
background-color:#C9F;
float:left;
} ? ?
.rightbox{
width:200px;
height:300px;
background-color:#FCF;
float:right;
}
/*在此定義相應(yīng)的類選擇器,并根據(jù)要求設(shè)置相關(guān)CSS屬性*/
.clear{clear:both;
height:0;
overflow:hidden;}
</style>
</head>
<body>
<div class="mainbox">
? ? <div class="leftbox"></div>
? ? <div class="rightbox"></div>
? ? <div class="clear"></div>
</div>
<!--在此添加相應(yīng)的div標(biāo)簽-->
</body>
</html>
2016-12-05
leftbox 寫成lefebox了