顯示不出來?
<!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>無標(biāo)題文檔</title>
<style type="text/css">
*{padding:0;margin:0;}
.mainBox{width=960px;height=300px;background-color:#CFF;overflow:visible;}
.leftBox{width=740px;height=300px;background-color:#C9F;float:left;}
.rightBox{width=210px;height=300px;background-color:#FCF;float:right;}
.clear
{
? ? clear:both;
height:0;/*解決IE6下有高度的問題*/
? ? overflow:hidden;}
</style>
</head>
<body>
<!--在此添加相應(yīng)的div標(biāo)簽-->
<div class="mainBox">
? ? <div class="leftBox"></div>
? ? <div class="rightBox"></div>
? ? <div class="clear"></div>
</div>
</body>
</html>
2016-09-25
你的css代碼里面,width和height寫法錯了。應(yīng)該是冒號,不是等號。例如 ? width:960px;height:300px