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

前端 未结 11 1407
夕颜
夕颜 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:59

    This worked best for me:

    .no-page-break {
       display: inline-block;
       width: 100%;
       page-break-inside: avoid;
    }
    

    You can also specify the height if needed.

提交回复
热议问题