1

在 IE10 的文档末尾打印页脚时,我完全遇到了一个奇怪的问题。我遵循了与https://stackoverflow.com/questions/16737743/css-how-to-force-child-to-use-parent-height-in-sticky-footer类似的方法。它在包括 IE10 在内的所有 IE 版本中都能正确打印。但是 IE10 不支持页脚的绝对 CSS 定位,而是在内容之后立即显示页脚。我的实际代码示例如下。

body, html {
    height:100%;
    padding:0;
}

p {
    margin-top:0px;
    margin-bottom:1px;
}

#wrapper {
    position:relative;
    min-height:100%;
}

#content {
    padding-bottom:100px;
}

#footer {
    width:100%;
    position: absolute;
    bottom: 0px;
}

@media print {
    /*For FF to fix the printing issue.*/
    @-moz-document url-prefix() {
        #footer {
            position: relative;
        }
    }

    /*Chrome*/
    @media print and (-webkit-min-device-pixel-ratio:0) {
        #footer {
            position:relative;
        }
    }

内容在这里 示例页脚

如果有人对这个问题有所了解,我将不胜感激,因为这需要我进行一次旋转。

4

0 回答 0