6
求助前端生成的网页, 打印的时候当前页空间不足图片会被挤到下一页
source link: https://www.v2ex.com/t/818034
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
求助前端生成的网页, 打印的时候当前页空间不足图片会被挤到下一页
5 条回复 • 2021-11-26 09:41:34 +08:00
Opportunity 10 小时 34 分钟前
`background-image + `-webkit-print-color-adjust: exact;` 吧。。。
page-break-* 的属性只有避免分页的没有强制分页的。。。你的需求太奇怪了,正常来讲应该是在 `.content` 上应用 `page-break-inside: avoid;`
page-break-* 的属性只有避免分页的没有强制分页的。。。你的需求太奇怪了,正常来讲应该是在 `.content` 上应用 `page-break-inside: avoid;`
xpyusrs 9 小时 43 分钟前
@Opportunity 刚试了 page-break-inside: avoid; 实际.content 里面的 item 数量可能多个, 那样会很长, page-break-inside: avoid;的话有些打印出来的纸会留很多空白
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK