下面哪些方法可以清除浮动?(多选)
A: clear:both;
B: overflow:hidden;
C: 为父盒子设置height属性
D: .clearfloat:after{display:block;clear:both;content:"";visibility:hidden;height:0}.clearfloat{zoom:1}
A: clear:both;
B: overflow:hidden;
C: 为父盒子设置height属性
D: .clearfloat:after{display:block;clear:both;content:"";visibility:hidden;height:0}.clearfloat{zoom:1}
举一反三
- 下面哪些方法可以清除浮动?(多选) A: clear:both; B: overflow:hidden; C: 为父盒子设置height属性 D: .clearfloat:after{display:block;clear:both;content:"";visibility:hidden;height:0}.clearfloat{zoom:1}
- 以下选项中使用伪元素选择符让浮动元素的父元素高度自适应的是 A: 元素:after{content:"";display:block;clear:both} B: 元素:after{content:"";display:block;height:0;clear:both} C: 元素:after{content:"";display:block;clear:both;height:0;overflow:hidden;visibility:hidden} D: 元素:after{display:block;clear:both; height:0;overflow:hidden;visibility:hidden }
- 下面哪些样式设置可以清除层的浮动继承 A: .clearfloat{ clear:both;} B: .clearfloat{ clear:both;height:0;font-size:0; } C: .clearfloat{ float:left;} D: .clearfloat{height:0pxline-height:0px;;}
- 下面哪些样式设置可以清除层的浮动继承 A: .clearfloat{ clear:both;} B: .clearfloat{ clear:both;height:0;font-size:0; } C: .clearfloat{ float:left;} D: clearfloat{clear:left;}
- 【填空题】代码补全: .clearfix:after { content: ""; display: block; height: 0; clear: (); visibility: hidden; }