IE11:打印无限页面 [英] IE11: Printing infinite pages

查看:104
本文介绍了IE11:打印无限页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,在IE11中,当您尝试打印预览(或打印,这方面的)此页面(和本网站上的其他几个人)时,页面不会在预览窗格中呈现,页面数量无限攀升: http://www.greatjakes.com/recent-work/

Basically, in IE11, when you try to print preview (or print, for that matter) this page (and a few others on this site), the page never renders in the preview pane and the number of pages climbs up infinitely: http://www.greatjakes.com/recent-work/

这个错误也可以在这样的页面上找到:

This bug can also be found on pages like these:

http://www.greatjakes.com/news/

http://www.greatjakes.com/news / kegler-brown-website-honours-as-one-of-the-top-sites-of-2014 /

http:// www。 greatjakes.com/blog/the-disappearing-homepage-traffic-is-down-17-on-homepages-of-law-firm-websites/


  • 我只能在IE11中体验它。 IE8很好。

  • 它不是JS相关的。

  • 如果您完全删除了CSS,它会消失,但这是缺少的。

  • 如果您(使用浏览器内开发者工具)移除#content-inner> .page块逐个中的HTML元素,则会发现该页面实际打印正确将元素数量减少到约5(在某些页面中为3)。

  • I've only been able to experience it in IE11. IE8 is fine.
  • It is not JS-related. If you remove the JS from the page, it still occurs.
  • If you remove the CSS entirely, it goes away, but that is missing the point.
  • If you remove (using in-browser developer tools) the HTML elements within the #content-inner > .page block one by one, you'll find that the page actually prints properly when you reduce the number of elements down to about 5 (3 in some pages).

除此之外,我不知道会发生什么上!

Other than that, I have no idea what is going on! Any help would be appreciated.

推荐答案

我们设法将问题缩小到一个CSS规则:

We managed to narrow the issue down to a single CSS rule:

#footer {
  display: inline-block;
}



我们通过将inline-block改为inline在打印专用的CSS - 但这不会帮助别人解决自己的问题,因为错误可能表现为基于一些随机的情况。看来关键是要缩小事业。为此,我只是删除CSS的大块,直到页面实际呈现在打印预览。一旦我删除了导致问题的块,我恢复了一切,然后在关键块内工作,并按规则删除CSS规则,直到它工作。一旦我找出导致错误的确切行,我们改变了打印专用CSS中的规则(无需改变它在标准CSS中的外观)。

We solved the problem by changing "inline-block" to just "inline" within the print-only CSS - but that won't help others fix their own problem because the bug probably manifests itself based on a number of random circumstances. It seems the key was to narrow down the cause. To do this, I simply deleted chunks of CSS until the page actually rendered in print preview. Once I deleted the chunk that was causing the problem, I restored everything and then worked within the critical chunk and deleted the CSS rule-by-rule until it worked. Once I figured out the exact line that was causing the bug, we changed the rule within the print-only CSS (no need to change how it looked in the standard CSS).

这篇关于IE11:打印无限页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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