增加 Twitter Bootstrap 的模态大小 [英] Increase modal size for Twitter Bootstrap

查看:28
本文介绍了增加 Twitter Bootstrap 的模态大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更改模态表单的大小,或者更确切地说 - 让它响应我在那里呈现的内容.我正在使用它来呈现表单,并且如果需要我更愿意自己处理滚动.

I am trying to change the size of the modal form or rather - have it respond to the content I render there. I am using it to render a form and would prefer to deal with scrolling if required myself.

我渲染的表单可能需要另外 50 像素 - 只是缺少按钮.

The form I render probably needs another 50px - just missing the buttons.

所以我尝试在我的 application.css.scss 文件中覆盖 .modal 样式(使用 Rails 3.2),但 max-height 和溢出声明似乎被覆盖了.

So I have tried overriding the .modal styles in my application.css.scss file (Using Rails 3.2) but the max-height and overflow declerations seems to be overwritten.

有什么想法吗?

推荐答案

我也遇到了同样的问题,你可以试试:

I was having the exact same problem, you can try:

.modal-body {
    max-height: 800px;
}

如果你注意到滚动条只出现在模态对话框的主体部分,这意味着只需要调整主体的最大高度.

If you notice the scroll-bars appear only on the body section of the modal dialog, this means that the max-height of only the body needs to be adjusted.

这篇关于增加 Twitter Bootstrap 的模态大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆