RoR 中的滚动窗格?

发布于 2024-10-07 02:16:22 字数 168 浏览 6 评论 0原文

抱歉,可能是另一个愚蠢的问题,但是我有很多信息要放入我的 RoR 应用程序的窗格中,我如何实现滚动功能,这样如果信息多于固定窗格中应该容纳的内容(例如 600 px宽度向下 600 像素),那么滚动选项将自动可用?

如果我可以监视窗口大小,并且如果窗口中有更多文本,则更好,然后自动启用垂直滚动......

Sorry, probably another silly question, but I've got a lot of information to put onto a pane of my RoR application, how do I implement scroll functionality so if the information is more then what should fit within a fixed pane (say 600 px wide by 600 px down), then a scroll option will automatically be available?

Even better if I can monitor the window size, and if there is more text then window then to automatically enable scrolling both vertically...

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

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

发布评论

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

评论(1

烟沫凡尘 2024-10-14 02:16:22

我想您需要的是设置容器元素的样式。更多与 CSS 相关,而不是 Rails

.some-container{width:600px;height:600px;overflow:auto;}

I suppose what you need is to style your container element. More to do with CSS rather than Rails

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