并排可调整大小的 div

发布于 2024-11-15 00:02:43 字数 261 浏览 2 评论 0原文

可能的重复:
JQuery/JQueryUI 水平分隔线

如何并排放置两个 div 并使它们一起调整大小。我想要两个 div 之间有一个可移动分隔线的效果,就像 Windows 资源管理器一样。

Possible Duplicate:
JQuery/JQueryUI hortizontal divider

How do I put two divs side by side and make them both resize together. I want the effect of a movable divider between two divs like windows explorer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我不吻晚风 2024-11-22 00:02:43

其中一个 div 必须是另一个 div 的容器。浮动内部 div 并在外部 div 上设置边距以匹配内部 div 的宽度。这将允许每个 div 的内容水平显示它需要的位置。然后将内部 div 的高度设置为 100%,以便它始终填充外部 div 上的垂直空间,并且可以在需要时拉伸它。

One of the divs must be the container for the other. Float the inner div and set a margin on the outer div to match the width of the inner. That will allow the content for each div to show where it needs to horizontally. Then set the height of the inner to 100%, so that it always fills up the vertical space on the outer div and can stretch it if needed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文