【问题标题】:bootstrap create textarea and two buttons inlinebootstrap 创建 textarea 和两个内联按钮
【发布时间】:2020-11-25 02:36:36
【问题描述】:

我需要使用引导内联表单或布局下方的任何其他方式创建文本区域和按钮,如下所示,我尝试过下面的代码,但它似乎不起作用

<div class="form-inline">
                                <div class="form-group">
                                    <textarea class="form-control input-sm" rows="3" style="resize: none" ng-model="formData_EventDetails.serviceNowStr" id="serviceNowStr" readonly placeholder=""></textarea>
                                    <button class="uk-button primary " ng-click="viewServiceNowPopup(formData_EventDetails)" style="display: inline" > &nbsp;View &nbsp;</button>
                                    <button class="uk-button primary " ng-click="openServiceNowPopup(formData_EventDetails)" style="display: inline; margin-top: 5px" > Search </button>

                            </div>
                        </div>

【问题讨论】:

  • 您的意思是“它似乎不起作用”您具体看到了什么问题?你试过什么?您是否添加了任何您自己的自定义 CSS?

标签: html css twitter-bootstrap-3


【解决方案1】:

使用水平引导表单来执行此操作

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<div class="form-horizontal">
  <div class="form-group">
    <div class="col-xs-10">
      <textarea class="form-control input-sm" rows="3" style="resize: none" ng-model="formData_EventDetails.serviceNowStr" id="serviceNowStr" readonly placeholder=""></textarea>
    </div>
    <div class="col-xs-2">

      <button class="btn uk-button btn-block btn-default " ng-click="viewServiceNowPopup(formData_EventDetails)"> &nbsp;View &nbsp;</button>
      <button class="btn uk-button btn-block btn-primary " ng-click="openServiceNowPopup(formData_EventDetails)"> Search </button>

    </div>

  </div>
</div>

here

【讨论】:

  • 为了正确对齐,您必须编写一些自定义 css
【解决方案2】:
<div class="form-inline">
    <div class="form-group">
        <textarea class="form-control input-sm" rows="3" style="resize: none" ng- 
         model="formData_EventDetails.serviceNowStr" id="serviceNowStr" readonly 
         placeholder=""></textarea>
    </div>
   <div>
       <button class="uk-button primary " ng- 
       click="viewServiceNowPopup(formData_EventDetails)" style="display: inline" > 
       &nbsp;View &nbsp;</button>
       <button class="uk-button primary " ng- 
       click="openServiceNowPopup(formData_EventDetails)" style="display: inline; 
       margin-top: 5px" > Search </button>
   </div>

【讨论】:

    猜你喜欢
    • 2021-02-12
    • 1970-01-01
    • 2020-03-09
    • 1970-01-01
    • 2018-11-05
    • 2016-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多