我有一个代码片段,我正在尝试清除黄色 div 下的橙色 div。为什么很清楚:左不工作?
#parent {
height:300px;
width:100px;
float:left;
border: 1px solid;
}
#unknown {
float:right;
height:50px;
width:20px;
clear:left; /* Shouldn't it make child(orange) div to float under? */
background-color: yellow
}
#child {
float:right;
height:100px;
width:50px;
background-color: orange;
/*text-align: center;*/
}