6

求助前端生成的网页, 打印的时候当前页空间不足图片会被挤到下一页

 2 years ago
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.
neoserver,ios ssh client
求助前端生成的网页, 打印的时候当前页空间不足图片会被挤到下一页
5 条回复    2021-11-26 09:41:34 +08:00

Opportunity

Opportunity   10 小时 34 分钟前

`background-image + `-webkit-print-color-adjust: exact;` 吧。。。

page-break-* 的属性只有避免分页的没有强制分页的。。。你的需求太奇怪了,正常来讲应该是在 `.content` 上应用 `page-break-inside: avoid;`

xpyusrs

xpyusrs   9 小时 47 分钟前

@liiihhhh 兄弟问一下这个点打印后背景图不显示怎么解决

xpyusrs

xpyusrs   9 小时 43 分钟前

@Opportunity 刚试了 page-break-inside: avoid; 实际.content 里面的 item 数量可能多个, 那样会很长, page-break-inside: avoid;的话有些打印出来的纸会留很多空白

关于   ·   帮助文档   ·   API   ·   FAQ   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   4022 人在线   最高记录 5497   ·  

创意工作者们的社区

World is powered by solitude

VERSION: 3.9.8.5 · 17ms · UTC 02:26 · PVG 10:26 · LAX 18:26 · JFK 21:26
♥ Do have faith in what you're doing.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK