css CSS:简单清除修复

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css CSS:简单清除修复相关的知识,希望对你有一定的参考价值。

/**
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    contenteditable attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that are clearfixed.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */
.cf:before,
.cf:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.cf:after {
    clear: both;
}

/**
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */
.cf {
    *zoom: 1;
}

以上是关于css CSS:简单清除修复的主要内容,如果未能解决你的问题,请参考以下文章

css 清除修复

css 清除浮动修复以适合父级

css 清除修复

css 哈克清除修复容器

CSS 清除修复

CSS 清除修复