HTML print with absolute postitions

前端 未结 6 1280
野的像风
野的像风 2020-12-30 00:51

Is it possible to print a HTML page with truly absolute positioned elements to paper? It seems all browsers are doing a big mess here. It is easy to define a body by absolut

6条回答
  •  隐瞒了意图╮
    2020-12-30 01:10

    set the margin with page setup is the first and primary solutions for printing the HTML page or a DIV .

    After all not expected result will come then you need some digs on your HTML page.

    Make a window without title bar or any custom bar using java script.And put all Original data into that window with a position:relative and also set the media type as print.

    position:relative;
    media:print;
    

    Hope it will helpful.

提交回复
热议问题