替代page-break-inside:避免因为兼容性问题 [英] alternative to page-break-inside:avoid because of compatibility issues

查看:89
本文介绍了替代page-break-inside:避免因为兼容性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个php文件,其中的div应该留在一个页面,
这个possebillity我发现这个:

I have a php file with 's and the things in the div should stay on one page, for this possebillity i found this:

a href =http://www.w3schools.com/css/pr_print_pagebi.asp =nofollow noreferrer> http://www.w3schools.com/css/pr_print_pagebi.asp

http://www.w3schools.com/css/pr_print_pagebi.asp

但是像你可以看到它只与歌剧兼容,没有更多。
我不想要求我的用户使用歌剧,所以我想知道是否有一个替代page-break-inside:avoid。

However like you can see its only compatible with opera and nothing more. I dont want to demand my users to use opera so I was wondering if there was a alternative to the "page-break-inside:avoid".

感谢
Matthy

Thanks Matthy

推荐答案

支持打印特定CSS非常糟糕。请查看 CSS讨论Wiki 了解详细指南(它还有一个链接到浏览器支持兼容性表)。我已经取得了一些成功与 page-break-before:always 当我在玩这种东西几个星期前 - 只要你的div小于页长,你可以在它之前强制分页?

Support for print specific CSS is pretty crappy. Have a look at the CSS discuss Wiki for an extensive guide (it also has a link to a browser support compatibility table). I have had some success with page-break-before: always when I was playing around with this sort of thing a few weeks back - as long as your div is less than a page long you may be able to just force a page break before it?

这篇关于替代page-break-inside:避免因为兼容性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆