【问题标题】:text not aligned with corresponding checkbox文本未与相应复选框对齐
【发布时间】:2016-06-04 00:01:38
【问题描述】:
<div ng-repeat="option in LgODDL track by $index">
    <label> 
        <input type="checkbox" ng-model="selected[$index]" ng-click="toggleOrderSelection(option.Number, option.NumberDetails)">  {{option.NumberDetails}}
    </label>
</div>

我认为这是我唯一可能影响这一点的 CSS:

input {
    line-height: normal;
    height: 22px;
    white-space: nowrap;
}

谁能告诉我为什么上面的代码生成的文本与复选框不均匀对齐?

【问题讨论】:

    标签: html css angularjs


    【解决方案1】:

    将以下样式添加到您的 &lt;input&gt; 标签:

    .checkbox-align {
      padding-top: 7px;
      margin-bottom: 0;
      vertical-align: middle;
    }
    

    【讨论】:

      猜你喜欢
      • 2012-10-30
      • 2014-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-13
      • 2019-11-16
      相关资源
      最近更新 更多