如何使 HTML 列的宽度可调?

发布于 2024-11-28 11:22:58 字数 8 浏览 2 评论 0原文

continue

I have a HTML application that works with three columns, each of which is a div in a container object.


     |        |    
 A   |   B    | C
     |        |     

I'd like to make it such that the three columns would each be adjustable, and the text would reflow and adjust inside of them.

This works trivially with Frames (See: http://www.tizag.com/pics/htmlT/frameindex.html ), but I'd like to replicate this behavior with my Divs.

Is there a jQuery plugin to do this? The best way I can think of is to create a slider div between the contents, similar to the implementation at http://www.catchmyfame.com/2010/08/12/adjustable-columns-with-jquery/

Is there any easier/cleaner/prettier way? This seems like it has to be a pretty standard request...

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

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

发布评论

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

评论(1

空城旧梦 2024-12-05 11:22:58

continue

A rudimentary way to set them up all the same width:

div {
    float: left;
    width: 33%;
    height: 300px;
    overflow: scroll;
    }

If you want to allow the user to resize the columns with a drag-n-drop method then you'll want to look into a JS framework. Here's a jQuery example:

http://docs.jquery.com/UI/API/1.8/Resizable

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