【问题标题】:label and value overlapping in material design with bootstrap带有引导程序的材料设计中的标签和值重叠
【发布时间】:2018-03-26 15:26:14
【问题描述】:

我在我的 ember 应用程序中使用 mdb。我正在为输入字段生成动态值。在 UI 中,值和标签正在重叠。如何处理?

<div class="md-form">
    <i class="fa fa-user-o prefix grey-text iconSize"></i>
    {{input type="text" id="firstName" class="form-control" value=model.firstName}}
    <label for="firstName">First Name<i class="mandatoryIcon">*</i></label>
</div>

【问题讨论】:

    标签: javascript css ember.js material-design


    【解决方案1】:

    试试这个:

    didInsertElement() {
      this._super(...arguments);
      if (this.get('model.firstName') !== null) {
        Ember.$('firstName').focus();
      }
    }
    

    您也可以随时使用自动对焦属性

    {{input type="text" id="firstName" class="form-control" value=model.firstName autofocus=true}}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-02
      • 2015-07-08
      • 2021-08-12
      • 2017-08-23
      • 1970-01-01
      • 2017-01-27
      • 2015-05-23
      • 2018-05-16
      相关资源
      最近更新 更多