<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>清除浮动</title><style>.out{width: 800px;border-color: darkmagenta;border-style: solid;border-width: 2px;}.daMao{background-color:burlywood;width: 200px;height: 200px;margin: 0 auto;float: left;}.erMao{background-color:cornflowerblue;width: 200px;height: 200px;margin: 0 auto;float: left;}.floot{width: 800px;height: 300px;background-color:forestgreen;}</style></head><body><div class="out"><div class="daMao">大毛</div><div class="erMao">二毛</div></div><div class="floot"></div></body></html>

由于大毛二毛两个盒子浮动导致两毛的父盒子高度接近于0了所以最后一个盒子(绿色盒子)没有排到两毛的下面来。
