page-break-inside doesn't work in Chrome?

前端 未结 11 1425
夕颜
夕颜 2020-12-05 17:32

I have a bunch of paragraphs on a page:

...

...

...

The CSS rule for those p

11条回答
  •  甜味超标
    2020-12-05 17:36

    Actually, it DOES work in Chrome, and the solution is really silly!!

    Both the parent and the element onto which you want to control page-breaking must be declared as:

    position: relative;
    

    Check out this fiddle (or in fullscreen)

    This is true for:

    page-break-before
    page-break-after
    page-break-inside
    

    However, controlling page-break-inside in Safari does not work (in 5.1.7, at least)

    I hope this helps!!!

提交回复
热议问题