解决等高列的方法
2015-06-26 16:55
330 查看
https://css-tricks.com/fluid-width-equal-height-columns/
常用方法
1. css3属性 -webkit-linear-gradient
2. 伪类before after
3. table
4. display:table; table-cell
5. one true layout method
css:
flexbox method
js method
推荐伪类的方法,兼容性好
参考链接
http://nicolasgallagher.com/multiple-backgrounds-and-borders-with-css2/demo/backgrounds.html
这个里面可以有间距
http://callmenick.com/post/css-equal-height-columns-three-different-ways
这个里面也提了一些解决方案
http://webdesign.tutsplus.com/tutorials/quick-tip-solving-the-equal-height-column-conundrum–cms-20403
常用方法
1. css3属性 -webkit-linear-gradient
2. 伪类before after
3. table
4. display:table; table-cell
5. one true layout method
<div id="one-true" class="group"> <div class="col"></div> <div class="col"></div> <div class="col"></div> </div>
css:
#one-true{ overflow: hidden; } #one-true .col { width: 27%; padding: 30px 3.15% 0; float: left; margin-bottom: -99999px; padding-bottom: 99999px; } #one-true .col:nth-child(1) { margin-left: 33.3%; background: #ccc; } #one-true .col:nth-child(2) { margin-left: -66.3%; background: #eee; } #one-true .col:nth-child(3) { left: 0; background: #eee; } #one-true p { margin-bottom: 30px; } /* Bottom padding on col is busy */
flexbox method
js method
推荐伪类的方法,兼容性好
参考链接
http://nicolasgallagher.com/multiple-backgrounds-and-borders-with-css2/demo/backgrounds.html
这个里面可以有间距
http://callmenick.com/post/css-equal-height-columns-three-different-ways
这个里面也提了一些解决方案
http://webdesign.tutsplus.com/tutorials/quick-tip-solving-the-equal-height-column-conundrum–cms-20403
相关文章推荐
- 安卓数据存储之sdcard存储
- [SoapUI] Read data from response , use it to update parameter
- Android 存储相关的名词解释
- Java利用Zxing生成二维码
- 在Coursera,随时都是学习的好时候
- textView判断是否为空
- android仿最新6.2版本微信相册
- 游戏设计的艺术:一本透镜的书——第十七章 故事和游戏在世界里发生
- Zookeeper__Dubbo__Spring集合使用
- 二分查找插入排序
- 开始博客记录
- HDU 3376 Matrix Again(最大费用最大流)HDU2686加强题
- 蘑菇街面试总结
- 游戏设计的艺术:一本透镜的书——第十六章 故事和游戏结构能用间接控制巧妙地联合起来
- 如何用U盘制作Ubuntu 15.04启动盘
- 汇编语言学习笔记(8)——数据处理的基本问题
- 二维码
- 前端设计师,网址精选
- Combox控件初始化项的技巧
- [SoapUI] Reference parameter 引用变量