gpt4 book ai didi

twitter-bootstrap - bootstrap 4创建具有多行的模态页脚

转载 作者:行者123 更新时间:2023-12-03 23:39:20 25 4
gpt4 key购买 nike

我试图在 bootstrap 4 中获得一个模态页脚以具有多个 100% 宽度的行。所以对于下面最基本的 Bootstrap 模式示例,是否可以让关闭和保存更改按钮位于不同的行并且都是 100% 宽度?

<div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div><div class="modal-body">
...
</div><div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>

最佳答案

是的,您可以放置​​两个 modal-footer元素。

<div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div><div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button col-lg-12" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
<div class="modal-footer">
<button type="button col-lg-12" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>

然后在你的css中添加这个
#exampleModalLong .modal-footer .btn{
width:100%;
}

在这里你有一个jsfillde link

关于twitter-bootstrap - bootstrap 4创建具有多行的模态页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45105736/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com