css 参考指南 float清除浮动
2015-04-01 22:54
363 查看
float 的作用 是为了实现让文字环绕效果,这样一来会破坏父元素的高度 这时突然蒙了,BUG,BUG!!!
其实这并不BUG ,是特性。
那如果解决这个问题呢?
1.clear:both; (两个山之间的铁链桥)
2.BFC/haslayout (受保护,隧道桥)
.clearfix:after{content:'';display:block;height:0;overflow:hidden;clear:both} //作用在父元素上边
.clearfix{*zoom:1;}
display :table-cell;
其实这并不BUG ,是特性。
那如果解决这个问题呢?
1.clear:both; (两个山之间的铁链桥)
2.BFC/haslayout (受保护,隧道桥)
.clearfix:after{content:'';display:block;height:0;overflow:hidden;clear:both} //作用在父元素上边
.clearfix{*zoom:1;}
display :table-cell;
相关文章推荐
- css清除浮动float的三种方法总结,为什么清浮动?浮动会有那些影响?一起来$('.float')
- 关于CSS Hack与float闭合的CSS技巧 清除浮动代码
- css清除浮动float的七种常用方法总结和兼容性处理
- 【转】CSS清除浮动_清除float浮动
- css清除浮动float的三种方法总结
- css清除浮动float的三种方法总结,为什么清浮动?浮动会有哪些影响?
- 一天搞定CSS: 清除浮动(float)--13
- css清除浮动float的三种方法总结,为什么清浮动?浮动会有那些影响?
- CSS清除float浮动_div+css简单了解
- HTML5高级之css清除float浮动
- css清除浮动float的几种方法
- [CSS]CSS浮动float详解(三):清除浮动方案
- CSS-float浮动与清除浮动
- css清除浮动float的三种方法总结
- CSS清除浮动 清除float浮动
- CSS 浮动 float 清除浮动 clear 最容易理解的文章
- CSS清除浮动_清除float浮——详解overflow:hidden 与clear:both属性
- CSS 浮动(float:left),清除浮动(clear:both)
- CSS清除浮动_清除float浮动
- CSS清除浮动_清除float浮动