小编mah*_*esh的帖子

打印页面预览时,内容在页脚上重叠

我试图实现一些代码,这些代码将在我的所有网页上创建页眉和页脚,但内容在页脚上重叠.

我的样式表:

 <style>

    @media print
    {

        #Header
        {
            display: block;
            position: fixed;
            top: 0pt;
            left: 0pt;
            right: 0pt;
            font-size: 200%;
        }

        #Footer
        {
            display: block;
            position: fixed;
            bottom: 0pt;
            left: 0pt;
            right: 0pt;
            font-size: 200%;
            page-break-before: always;
        }

        #form
        {
            display: block;
            position: relative;
            top: 0.5in;
            left: 0pt;
            bottom: 0.5in;
            right: 0pt;
        }

    }
</style> 
Run Code Online (Sandbox Code Playgroud)

我的内容,内容和页脚div在内容中插入超过A4尺寸的行以打破打印预览中的页面.

 <div class="wordcontent">
    <div class="" style="height: 0.5in;" contenteditable="true" id="Header">
        HEADER
    </div>
    <div id="form" name="formDiv" contenteditable="true" style="min-height: 10in;">
     content more then 500 lines
    </div>
    <div class="" …
Run Code Online (Sandbox Code Playgroud)

html css jquery

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

标签 统计

css ×1

html ×1

jquery ×1