【问题标题】:To change the size of Dropdown Text box更改下拉文本框的大小
【发布时间】:2021-07-16 14:54:50
【问题描述】:

我必须增加下拉菜单的大小。 HTML

<div *ngIf="SecondView">
  <span class="search-view">
      <input class="form-check-input position-static push-down-3" 
          name="custView" type="radio" value="branchView" 
          aria-label="..." (click)="View(2)">
      Branch View
  </span>
  <label>
    <div class="changes" *ngIf="showBranchDropdown">
      <ng-select placeholder="All" [virtualScroll]="true" 
          formControlName="assignBranchName">
          <ng-option *ngFor="let data of assignBranchData" [value]="data.id">
          {{data.name}}
          </ng-option>
      </ng-select>
    </div>
  </label>
</div>

CSS

.changes{
width:200px;
}

这是当前的下拉菜单大小:

应该是这样的:

【问题讨论】:

    标签: html css angular


    【解决方案1】:

    尝试用min-width 代替width

    .changes{
       min-width: 200px;
    }
    

    【讨论】:

      【解决方案2】:

      只需更改占位符的名称即可。

      【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-18
      • 2014-09-16
      • 2011-12-08
      • 1970-01-01
      相关资源
      最近更新 更多