本文介绍了在Firefox中打印字段集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经添加了一些新的CSS到现有的项目(使用媒体=打印)在页眉。它是顺利和(一次!)IE是给予不错的,预期的结果,但火狐不... ...

问题是,我有一个fieldset包含而且Firefox完全拒绝(即使在最新版本中),以允许fieldset内的分页符。这意味着任何不适合在一个页面上的任何东西都会丢失...



我发现在已经开放3年的mozilla网站上确认的错误 - - 但不能找到任何合理的解决方法...

任何建议之前,我期待删除字段集或类似的?

谢谢,
Dave

解决方案

据我猜测,它仍然在最新的。



您可以尝试类似于(也称为)。



Firefox onbeforeprint



因此,当 onbeforeprint 被触发时,您可以将字段集 s更改为 div s,或者其他东西。



我不确定这是多么可行,而且听起来很复杂。 p>

I've been adding some new css to an existing project (using media="print") in the page header. It's going smooth and (for once!) IE is giving nice, expected results, but Firefox does not...

The problem is that I have a fieldset which contains a lot of fields, and Firefox completely refuses (even in the latest version) to allow a page break inside the fieldset. This means anything that doesn't fit on one page is lost...

I've found the bug acknowledged on the mozilla website which has been open for 3 years - https://bugzilla.mozilla.org/show_bug.cgi?id=471015 - but can't find any reasonable workaround...

Any suggestions before I look to remove fieldsets or similar?

Thanks,Dave

解决方案

As I guessed, it's still broken in the latest Nightly.

You could try to do something similar to IE Print Protector (aka the widely used html5shiv).

http://www.iecss.com/print-protector/#how-it-works

Firefox now supports onbeforeprint.

So, when onbeforeprint is fired, you could change the fieldsets for divs, or something.

I'm not sure how viable this is, and it sure sounds complicated.

这篇关于在Firefox中打印字段集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 00:24
查看更多