等高布局

1. table-cell

    默认等高

  (table-cell还可实现两栏自适应布局)

2. padding + margin

  padding-bottom: -1000px;

  margin-bottom: 1000px;

  overflow: hidden;

3. 利用背景图片或者颜色模拟

4. 利用border造成假高现象

5. position

  position: absolute;

  left: 0;

  top: 0;

  bottom: 0;

  将top, bottom全都设为0,就会随着父元素高度而变化高度,达到等高效果

posted @ 2017-06-26 22:46  夏目桑  阅读(111)  评论(0编辑  收藏  举报