计算宽度cal 使用float+BFC方法 触发BFC,建议大家多去了解BFC,很多时候布局都会用到。 flex方案 使用absolute+margin-left方法 float+margin-left方案 table方案