首页htmlmediaCSS Property Value - 如何关闭屏幕的页脚,所有页面打印时显示页脚

CSS Property Value - 如何关闭屏幕的页脚,所有页面打印时显示页脚

我们想知道如何关闭屏幕的页脚,所有页面打印时显示页脚。

<!DOCTYPE html>
<html>
<head>
    <style type="text/css">
        @media screen {
            .page-footer, .page-break {
                display: none;
            }
        }

        @media print {
            body {
                margin: 0;
            }

            .page-section {
                height: 9.5in; /* IE default margins are .75in */
                position: relative;
            }

            .page-footer {
                display: block;
                position: absolute;
                bottom: 0;
            }

            .page-break {
                page-break-before: always;
            }

        }
    </style>
</head>
<body>
    <div class="page-section">
        <div>One</div>
        <div>Two</div>
        <div class="page-footer"><span class="footer-text">Footer one</span></div>
    </div>
    <div class="page-break"></div>
    <div class="page-section">
        <div>Three</div>
        <div class="page-footer">Footer two</div>
    </div>
</body>
</html>