How to print a full content of JScrollPane?

守給你的承諾、 提交于 2019-12-08 04:11:31

问题


I am just a designer and don't know javascript well enough to figure out how to print a full content of a JScrollPane, not a visible part of it. I would very much appreciate any help with the issue. Thanks!


回答1:


I'd suggest creating a print-stylesheet that contains following rules:

div.jScrollPaneContainer {
   position: static !important;
   height: auto !important;
   overflow: visible !important;
}

div.jScrollPaneContainer > * {
   display: none !important;
}

div.scroll-pane {
   position: static !important;
   display: block !important;
   float: none !important;
}

all selectors used in the code above correspond to HTML structure of jScrollPane basic example




回答2:


Didn't work for me with jScrollPane - v2.0.0beta11 - 2011-07-04. Taking a quick look at the generated source code shows that the div class names have changed. Here is what I put in my print.css:

div.booksummary,  
div.booksummary > div {
  position:static !important;
  height: auto !important;
  overflow: visible !important;
}

where the jQuery code is:

$('.booksummary').jScrollPane();

Another thought : Putting CSS properties in @media print {} only works if the CSS file in question is loaded, which won't happen if the CSS file is associated to the 'screen' media.




回答3:


Or put the entire scrollpane stylesheet inside a

@media print
{
 //scrollpane css goess here.

}


来源:https://stackoverflow.com/questions/2570906/how-to-print-a-full-content-of-jscrollpane

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!