打印样式表,一页打印并截断剩余文本 [英] print stylesheet, one page prints and cuts off remaining text
问题描述
我正在处理可打印的事件列表,打印机打印一页的细节,但切掉底部的一些文本,然后打印第二个空白页
I'm working on a printable list of events, the printer prints one page fine, but cuts off some of the text on the bottom, then it print a second blank page
我试过了我所知道的一切,但却失落了。
I've tried everything I know but am at a loss.
推荐答案
c $ c>溢出:可见而不是溢出:auto
这固定在我在Firefox至少。 overflow auto的定义是:如果剪切溢出,应该添加一个滚动条以查看内容的其余部分 - 但是在打印的页面上不存在滚动条。
In print.css, set overflow: visible
instead of overflow: auto
on div#content
. That fixed it for me in Firefox at least. The definition of overflow auto is: "If overflow is clipped, a scroll-bar should be added to see the rest of the content" -- but scroll bars don't exist on printed pages.
我猜测,因为内容div应该跨越多个页面,浏览器认为你流到你的容器外面,必须用滚动条剪切。在这种情况下,容器是内容div出现的第一页。
I'm guessing that since the content div should span across multiple pages, the browser thinks "you're flowing outside your container and must be clipped with a scroll bar". The container in that case is the first page the content div appears on.
这篇关于打印样式表,一页打印并截断剩余文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!