How to declare a div in @page @top-left

前端 未结 2 1466
感情败类
感情败类 2021-01-21 03:07

How do I declare that a DIV should be displayed in top-left corner of every page and not in its relative position.

I have a div like:

2条回答
  •  耶瑟儿~
    2021-01-21 03:27

    Doesn't

    #header {
       position: fixed;
       top: 0;
       left: 0;
    }
    

    work? See Printing Headers. Also, have a look at the W3C specification of position: fixed.

    EDIT: if I read the CSS 3 specs concerning Margin Boxes well enough, together with the CSS 2.1 specs about the content property, I don't think you can embed a

    from your page into the contents of a Margin Box, alas.

提交回复
热议问题