猿问

为什么这样写也是实现了提出的任务的,可以这样写吗?

<!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>无标题文档</title>
<style type="text/css">
.mainbox{
    width:960px;
    background-color:#CFF;
    float:left;
}
.leftBox{
    width:740px;
    background-color:#C9F;
    height:300px;
    float:left;
}
.rightBox{
    width:210px;
    height:300px;
    background-color:#FCF;
    float:right;
}
</style>
</head>

<body>
<div class="mainbox">
<div class="leftBox"></div>
<div class="rightBox"></div>
</div>
</body>
</html>

杨烊洋洋3379142
浏览 1787回答 8
8回答

慕莱坞8333017

5967801018095363437170978140166898778722481235034878562104827320877985924906515663645928270801888827083608580717311786565289644792618332275902244702783694828569881602541539980035873175374026191303335612760905549559826583262048701643308284200360541305177263161831715412119735981902504933032337649410848754129937225722327434093

eq361

父DIV浮动,假如父DIV下面还有元素呢?父DIV浮动,是开启了BFC,阻止了父DIV高度塌陷。

一诺yinol

对的!

John_Skeet

w...what do u mean dude
随时随地看视频慕课网APP
我要回答