在bootstrap模式中将textarea宽度设置为100% [英] Set textarea width to 100% in bootstrap modal
本文介绍了在bootstrap模式中将textarea宽度设置为100%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试所有可能的方法,但从未成功:
Was trying all possible ways, but never succeeded:
<div style="float: right">
<button type="button" value="Decline" class="btn btn-danger" data-toggle="modal" data-target="#declineModal">Decline</button>
</div>
<!-- Modal -->
<div class="modal fade" id="declineModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Comment</h4>
</div>
<div class="modal-body">
<textarea class="form-control col-xs-12"></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger">Decline</button>
</div>
</div>
</div>
</div>
如何使textarea在模态体div中覆盖所有可用空间= width 100%?
How to make the textarea in modal-body div to cover all available space = width 100%?
推荐答案
尝试将 min-width:100%
添加到textarea :
Try add min-width: 100%
to style of your textarea:
<textarea class="form-control" style="min-width: 100%"></textarea>
这篇关于在bootstrap模式中将textarea宽度设置为100%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文