Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css Twitter引导的页脚问题-z索引是解决方案吗?_Css_Twitter Bootstrap - Fatal编程技术网

Css Twitter引导的页脚问题-z索引是解决方案吗?

Css Twitter引导的页脚问题-z索引是解决方案吗?,css,twitter-bootstrap,Css,Twitter Bootstrap,我的模板基于。要保持页脚“粘性”,请使用以下CSS规则: /* Sticky footer styles -------------------------------------------------- */ html { position: relative; min-height: 100%; } body { /* Margin bottom by footer height */ margin-bottom: 60px; } .footer {

我的模板基于。要保持页脚“粘性”,请使用以下CSS规则:

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
}

body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;

    /* Set the fixed height of the footer here */
    height: 60px;
    background-color: #f5f5f5;
}

/* Custom page CSS -------------------------------------------------- */
/* Not required for template or sticky footer method. */

body > .container {
    padding: 60px 15px 0;
}
.container .text-muted {
    margin: 20px 0;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

code {
    font-size: 80%;
}
但是,当我包含一个表时,分页与页脚重叠。我认为这是由于DOM规则的工作方式

有一个使用
z-index
的修复程序:

.footer {
    z-index: 4;
}
这是最好的办法吗


如果你看一下并将“Show entries改为100”,你就会明白我的意思。

页脚上使用
z-index
是解决方案

.footer {
    z-index: 2;
}