相关疑难解决方法(0)

什么是clearfix?

最近我查看了一些网站的代码,发现每个人<div> 都有一个班级clearfix.

经过快速谷歌搜索,我了解到它有时适用于IE6,但实际上是什么是一个clearfix?

与没有clearfix的布局相比,您能提供一些带有clearfix的布局示例吗?

html css layout cross-browser clearfix

972
推荐指数
7
解决办法
64万
查看次数

当显示较小时,Div会从外部div中弹出

我得到以下代码:https: //jsfiddle.net/2uhttdgk/3/

html {
  height: 100%;
}
html, body {
    min-height: 100% !important;
    /* prevent horizontal scrolling */
    max-width: 100% !important;
    overflow-x: hidden !important;
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
}


#menuButton {
    float:left;
    background-image: url("../images/hamburger_menu.png");
    width: 50px;
    height: 40px;
    margin-right: 5px;
}

#powerButtonBox {
    float: right;
}

#outerBox {
    min-height: 100%; 
    height: auto !important;
    height: 100%;
}

#title {
    background: #E95353;
    padding: 10px;
    color: white;
    font-size: x-large;
}


#outerBox {
    width: 100%;
    height: 100%;
}


.nav a …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery

1
推荐指数
1
解决办法
68
查看次数

标签 统计

css ×2

html ×2

clearfix ×1

cross-browser ×1

javascript ×1

jquery ×1

layout ×1