`page-break-inside: avoid;`的跨浏览器支持 [英] Cross-browser support of `page-break-inside: avoid;`
问题描述
我在一个页面上有很多 div
,其中包含不同数量的内容.我正在尝试使用 page-break-inside: avoid;
以便每个 div 部分不会超过 2 页.
I have a lot of div
s on a page with variable amounts of content in them. I am trying to use page-break-inside: avoid;
so that each div section is not broken over 2 pages.
它可以在 Firefox 中运行,但不能在 IE8 中运行.
It is working in Firefox but not IE8.
我的 CSS 打印文件中有这个
I have this in my CSS print file
.page-break-inside-avoid { page-break-inside: avoid; }
并且我的 div 带有 <div class="page-break-inside-avoid">
and my divs carry the class like in <div class="page-break-inside-avoid">
IE8 现在应该支持这个.不是吗?
IE8 is supposed to support this now. Isn't it?
我做错了吗?有人解决了这个问题吗?或者有相关经验?
Am I doing something wrong? Anyone solved this issue? Or had any experience with it?
任何帮助都会很棒.
非常感谢理查德
推荐答案
Webdevout.net 是检查浏览器 CSS 兼容性的好地方.
Webdevout.net is a great place to check browser CSS compatibility.
对于 page-break-inside
只有 IE8 和 Opera 8+ 显示支持它
For page-break-inside
only IE8 and Opera 8+ are shown to support it
这篇关于`page-break-inside: avoid;`的跨浏览器支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!