jScrollPane 和 Cufon 结合在一起。有人能让它发挥作用吗?
我在滚动面板元素中使用了 cufon,如您所见 http://www.timersys.com/demos/flatbrook/grass-fed- Beef/
问题是 div 的底部被砍掉了。
我在 JScrollpane google groups 上搜索,但没有可用的解决方案。当 cufon 存在时,JScrollpane 计算的高度是错误的。
我已经尝试在 jscrollpane 之前和之后执行 cufon 。还尝试使用 cufon 回调选项执行 jscrollpane。但我总是得到相同的结果。
周围有人有可以提供帮助的解决方案吗?
感谢大家
I used cufon inside of my scrollpanel elements as you can see in
http://www.timersys.com/demos/flatbrook/grass-fed-beef/
Problem is that the bottom of divs are being chop off.
I searched on JScrollpane google groups but there is no solution available. When cufon is there JScrollpane calculates wrong the height.
I already tried to exceute cufon before and after jscrollpane. Also triend to exceute jscrollpane with cufon callback option. But always i get same result.
Anyone around with a solution that can help?
Thanks to all
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过向包含 jScrollPane 的 div 添加任何底部填充?
编辑:好的,上面的答案是一种解决方法,但是在解决了您的问题之后: http://jsfiddle.net /jennyfofenny/zM4hS/,我相信您的答案是在 Cufon.replace 行和 .jScrollPane() 行之间添加 Cufon.now() 调用。这应该可以解决我测试过的所有场景中的问题。
Have you tried to add any bottom padding to the div containing the jScrollPane?
EDIT: Alright, the above answer is a workaround, but after having gone over your problem: http://jsfiddle.net/jennyfofenny/zM4hS/, I believe your answer is to add a Cufon.now() call between your Cufon.replace line and your .jScrollPane() line. This should solve your problem in all scenarios that I've tested for.
问题是 jScrollPane 不知道 cufon 完成替换后文本会有多大......因此它错误地计算了内容的高度。正确的解决方案应该是使用 cufon 完整回调来初始化 jScrollPane 但你说你尝试过但它不起作用...
你有一个页面显示你使用 cufon 回调时它的样子吗?如果它确实不起作用,那么它会表明一个脚本或另一个脚本中存在错误...
另一种解决方案是使用 jScrollPane 的 autoReinitialise 设置,例如
http://jscrollpane.kelvinluck.com/auto_reinitialise.html
The problem is that jScrollPane doesn't know how big the text will be once cufon has done its substitution... So it incorrectly calculates the height of the content. The correct solution should be to use the cufon complete callback to initialise jScrollPane but you say you tried that and it didn't work...
Do you have a page showing how it looked when you were using the cufon callback? If it really doesn't work then it would suggest a bug in one script or the other...
Another solution would be to use the autoReinitialise setting for jScrollPane e.g.
http://jscrollpane.kelvinluck.com/auto_reinitialise.html