Bottom content cutoff using overflow: auto; and jscrollpane

孤街醉人 提交于 2019-12-01 09:34:32

问题


Because of a rotated content area, textoverflow, and a -webkit issue about the scroll bar not showing properly I've decided to use jscrollpane. For initial issue: Original Issue question to Sitepoint.

To prevent all that extra css code to create my own scrollbar for -webkit browsers I decided to use jscrollpane. It works accept for one major issue: The bottom several lines of text remain invisible! Please see: overflow: auto; with jscrollpane, but cutting off bottom text. How do I make it scrollable enabling all of the content to be visible?

Any help is appreciated.

PChuprina


回答1:


jScrollPane has some options for solving this:


autoReinitialise:true

(adds processing overhead.. use only if necessary)

http://jscrollpane.kelvinluck.com/auto_reinitialise.html


reinitialise()

(manually update pane size)

http://jscrollpane.kelvinluck.com/dynamic_content.html





回答2:


Welcome to stackoverflow!

This looks like a simple problem of timing. You are/something is altering the content of the scroll pane after the jsScrollPane() function has run.

First try simply including it in a $(document).ready() function. If that doesn't work go through your functions and check to see if any javascript is altering the size of that container and add jsScrollPane() as a callback.

Pretty sure the first will work for you though :)



来源:https://stackoverflow.com/questions/6258178/bottom-content-cutoff-using-overflow-auto-and-jscrollpane

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