Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 asp.net 应用程序中使用 jquery page-splitter 插件,来自这里: http: //methvin.com/splitter/
我的页面结构如下:
拆分器插件需要我指定一个静态高度,这会在屏幕尺寸变化时产生问题。
我希望能够以像素为单位精确设置页面拆分器高度,以便它适合任何屏幕尺寸并且不会溢出在页面中创建垂直滚动条。有可能这样做吗?
您可以使用 $(document).height() 获取文档大小,或使用 $(window).height() 获取窗口大小。
在页面加载时,您可以从那里设置拆分器 div 的大小,如下所示:
$(document).ready( function() { $("#splitterID").css("height", $(document).height() + "px"); })
如果您发布您正在使用的代码示例,如果上述方法不适合您,我们可能会整理出另一种解决方案。