使用滑动面板分隔符将 HTML 页面分成不同的部分?它是如何完成的?
我想将网页分为不同的部分,如此处所示。我想弄清楚这种技术叫什么以及实现它的有效方法?
该页面分为不同的部分,使用户可以使用面板手柄灵活地扩展和收缩不同的部分。
我假设这些不是常规框架(无论如何我都想避免使用)。
除了 jsfiddle 上的教程或好例子之外,还有人知道吗?
I'm wanting to divide a web page up into different sections as shown here. I'm trying to figure it out what this technique is called and an efficient way to implement it?
The page is divided up into different sections giving the user the flexiblity to expand and contract the different sections using panel handles.
I'm assuming these aren't regular frames (which I'd like to avoid using anyways).
Does anybody know of a tutorial or good example out there besides the one on jsfiddle?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个想法很简单。
你用一些元素来分解屏幕,给定高度的元素(比如div)并不重要。
然后将 onclick 事件附加到开始拖动的手柄。 onclick 的作用是将 mousemove 事件附加到主体,这将调整元素的大小。
这是我不久前写的东西(在我的 jquery 时代之前),我确信它可以写得更好,你可能会找到一个插件,我不知道有一个:
the idea is quite simple.
you break up the screen with some elements, it does not really matter which (say divs) with a given height.
then attach a onclick event to the handle that starts the drag. what the onclick does is attach a mousemove event to the body which will resize the elements.
here is something i wrote a while back (before my jquery days), i'm sure it could be written much better, and you might find a plugin for this, i don't know of one: