page-break-inside:avoid equivalent for Firefox and/or IE

前端 未结 4 1392
旧时难觅i
旧时难觅i 2020-12-20 11:53

I understand that the CSS page-break-inside:avoid instruction is supposed to prevent a page break within a div when an HTML document is printed. Through searchi

4条回答
  •  误落风尘
    2020-12-20 12:38

    How about just matching all element inside your element, except the first ones, and have them not break-before

    #yourelement *+*{
        page-break-before: avoid;
    }
    

提交回复
热议问题