twitter-bootstrap 在 bootstrap 模态内放置列

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23134743/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 20:31:41  来源:igfitidea点击:

Placing columns inside bootstrap modal

twitter-bootstrapmodal-dialogtwitter-bootstrap-3

提问by Duncan Ogle

I'm trying to get a Bootstrap model to have multiple columns inside it, however it does not appear to be working with my content appear vertically as opposed to in columns. My code is here:

我正在尝试让 Bootstrap 模型在其中包含多个列,但是它似乎不适用于我的内容垂直显示而不是在列中显示。我的代码在这里:

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Modal</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="row-md-6">
                        Left
                    </div>
                    <div class="row-md-6">
                        Right
                    </div>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>

I've found a few things around that solved this issue with Bootstrap 2, but they don't work with Bootstrap 3. I've also tried changing the row-md-6to sm, xsetc, but no luck. Is it possible to do it in Bootstrap 3? Columns would be the most ideal thing for me, but should I avoid columns all together?

我发现周围的解决了这个问题,自举2的几件事情,但他们没有与引导3.工作我也试图改变row-md-6smxs等,但没有运气。是否可以在 Bootstrap 3 中做到这一点?列对我来说是最理想的东西,但我应该避免一起使用列吗?

回答by Zim

There is no row-md-*in Bootstrap, but col-md-*should work..

row-md-*Bootstrap 中没有,但col-md-*应该可以工作..

    <div class="modal-body">
          <div class="row">
            <div class="col-md-6">
              Left
            </div>
            <div class="col-md-6">
              Right
            </div>
          </div>
    </div>

http://www.bootply.com/130819

http://www.bootply.com/130819