html - 如何使用 Bootstrap 行和列增加文本区域的高度

标签 html css twitter-bootstrap

我设计了一个表单,其中我有两个连续的元素,如下所示:

我的输出

enter image description here

我使用的代码:

<div class="row">
    <div class="col-sm-3">  <!-- [1, 0] -->
        <fieldset class="form-group">
            <label id="fieldTitle">Equipment Length</label>
            <select id="selectOption" class="form-control" required data-error="Please select Equipment Length"></select>
            <div class="help-block with-errors"></div>
        </fieldset>
    </div>
    <div class="col-sm-9">  <!-- [1, 1] -->
        <fieldset class="form-group">
            <label id="fieldTitle">Customer Notes</label>
            <textarea class="form-control" placeholder="Please write customer notes" ng-model="myTextarea" required data-error="Please enter customer notes"></textarea>
            <div class="help-block with-errors"> {{myTextarea}} </div>
        </fieldset>
    </div>
</div>

So, please guide me how do I increase the height of the textarea just like my

期望的输出 enter image description here 请告诉我该怎么做。 谢谢

最佳答案

使用 Bootstrap 4,您将需要具有属性行并添加“高度:100%;”这样高度就会拉伸(stretch)到指定的行数。 “行”沿行不起作用。

<textarea rows="10" style="height:100%;"></textarea>

关于html - 如何使用 Bootstrap 行和列增加文本区域的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48557955/

相关文章:

html - 自定义字体在 Canvas 中不起作用

html - 如何让 div 在必要时展开,就像表格一样?

html - CSS/HTML - 正确设置选择框的样式

javascript - 在数据表中删除没有数据的子行

javascript - Twitter Bootstrap、导航栏、下拉菜单无法正常工作

javascript - 将鼠标悬停在图像上,图像下方的图像不透明度和标题颜色发生变化......当标题变成两行时,它会破坏格式

html - 如何在填充的输入字段/框中对齐文本?

javascript - 为什么 W3schools 图标没有动画

javascript - ng-click 不起作用

javascript - Glyphicon Bootstrap v3 未加载