将边距应用于运行CSS位置

Sti*_*n.V 4 css footer itext

我正在使用以下CSS代码将我的页脚放在页面底部:

<style type="text/css">
    @page {
        @bottom-center { content: element(footer); }
    }
    #footer {position: running(footer);}
</style>
Run Code Online (Sandbox Code Playgroud)

有没有办法将它显示得稍微高一点?添加margin-bottom: 50px似乎没有效果.

更新:页面将使用iText转换为PDF

Sti*_*n.V 5

我终于设法使用以下CSS:

    <style type="text/css">
      @page { 
          margin-bottom: 100px;
          @bottom-center { 
            content:element(footer);
          }
      }

    #footer {
      position: running(footer);
    }
</style>
Run Code Online (Sandbox Code Playgroud)

以前,我只尝试在@ bottom-center和#footer中添加margin-bottom.