<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<title></title>
<style type="text/css">
* { margin: 0; padding: 0; border: 0; }
.ReH { width: 100% !important; padding: 0 !important; border: none !important; height: 0px !important; overflow: hidden !important; clear: both !important; margin-top: -1px !important; }
.Con, .Con_cen, .Con_list { margin: 0 auto; }
.Con { width: 1200px; min-height: 120px; border: 1px solid #ff0000; }
.Con_cen { width: 800px; min-height: 120px; border: 1px solid #ff6a00; }
.Con_list { width: 750px; min-height: 120px; border: 1px solid #000000; }
.Con_list li { list-style: none; width: 170px; height: 200px; float: left; margin-right: 20px; margin-bottom: 15px; border: 1px solid #0094ff; }
.Con_list li:nth-child(4n) { margin-right: 0; }
.Con_list li.ReH { float: none !important; margin: 0 !important;/*清除特殊元素的干扰样式*/ }
</style>
</head>
<body>
<div class="Con">
<div class="Con_cen">
<ul class="Con_list">
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li>1111</li>
<li class="ReH"></li>
</ul>
<div class="ReH"></div>
</div>
<div class="ReH"></div>
</div>
</body>
</html>

Css-自适应高度修复(高度随内容而自动撑高)的更多相关文章

  1. CSS中父元素高度没有随子元素高度的改变而改变,应该如何解决?

    如果子元素没有设置浮动(float),父元素实际上会根据内容,自动宽高进行适应的. 当子元素增加了浮动后,最简单的处理方法是给父元素添加overflow:hidden属性,此时父元素的高度会随子元素的 ...

  2. DIV+CSS自适应窗口高度

    <html> <head> <title>DIV+CSS自适应窗口高度</title> <style type="text/css&qu ...

  3. Android 让GridView的高度为Wrap_content根据内容自适应高度

    From:http://www.jayway.com/2012/10/04/how-to-make-the-height-of-a-gridview-wrap-its-content/ 如果把Grid ...

  4. 实现不同分辨率、不同浏览器下高度自适应、iframe高度自适应

    html: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <tit ...

  5. CSS布局中最小高度的妙用

    CSS布局中最小高度的妙用 --最小高度可以设定一个BOX的最小高度,当其内容较少时时,也能保持BOX的高度为一定,超出就自动向下延伸最小高度可以设定一个BOX的最小高度,当其内容较少时时,也能保持B ...

  6. css实现div的高度填满剩余空间

    css实现div的高度填满剩余空间 .top{ width: 100%; height: 70px;} .bottom{background-color: #cc85d9;width: 100%;po ...

  7. CSS 控制Html页面高度导致抖动问题的原因

    CSS 控制Html页面高度导致抖动,这类由高度导致页面抖动的问题,其实究其根本原因是滚动条是否显示导致的 在CSS中添加如下代码: html,body{ overflow-y:scroll;} ht ...

  8. datagridview自动增加行高度和显示全部内容

    this.dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders;  //自动调动dat ...

  9. CSS布局:div高度随窗口变化而变化(BUG会有滚动条)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

随机推荐

  1. [原]openstack-kilo--issue(七):虚拟机怎么通外网,外网怎么ping通虚拟机

    =====问题======= 虚拟机可以ping通外网,外网能ping通虚拟机但是收不到reply 这个问题本人遇到有两种情况: 1.安装完整openstack-kilo后,在route中和虚拟机中抓 ...

  2. 损失函数(Loss Function)

    转载请注明出自BYRans博客:http://www.cnblogs.com/BYRans/ 线性回归中提到最小二乘损失函数及其相关知识.对于这一部分知识不清楚的同学可以参考上一篇文章<线性回归 ...

  3. 正则表达式(/[^0-9]/g,'')中的"/g"是什么意思?

    解答“正则表达式(/[^0-9]/g,'')中的"/g"是什么意思?”这个问题,也为了能够便于大家对正则表达式有一个更为综合和深刻的认识,我将一些关键点和容易犯糊涂的地方再系统总结 ...

  4. Eclipse常用的十个方便的快捷键

    Ctrl+F:在当前代在cg中查找关键字 Ctrl+H:打开查找窗口 Ctrl+/: 屏蔽代码(注释): (以下转自:http://wenku.baidu.com/view/d291ade3172de ...

  5. js中的遍历foreach,$.each(),$().each()

    <!DOCTYPE html> <html> <head> <meta charset='UTF-8'> <title></title ...

  6. Simple Infinite automaton [C]

    Today I read the book Formal Language and Automaton Theory. And I learnt the infinite automaton. Her ...

  7. Java面向对象之接口

    什么是接口:接口是一种规范和标准,他们可以约束类的行为,是一些方法特征的集合 语法: [修饰符] interface 接口名 extends 父接口1,夫接口2....... class 类名 ext ...

  8. 万能的 SQL编程

    简介:T-SQL语句创建库.创建表和听.和添加约束等.T-SQL是数据库结构化查询语言,常见的增加.删出.修改.查询.创建库和创建表的语句,还支持定义变量.输出语句.逻辑控制语句(IF.CASE.WH ...

  9. uva10160 Servicing Stations

    The input consists of more than one description of town (but totally, less than ten descriptions). E ...

  10. DEV控件:gridControl常用属性设置

    1.隐藏最上面的GroupPanel  gridView1.OptionsView.ShowGroupPanel=false; 2.得到当前选定记录某字段的值  sValue=Table.Rows[g ...