【问题标题】:how to make html label text inherit div properties如何让html标签文本继承div属性
【发布时间】:2020-05-26 17:13:40
【问题描述】:

我在 col-6 div 中有一个测试标签。文本应具有 col-6 类的 div 的宽度。

这就是现在的样子

如何让文本继承 div 的宽度?

<div class="col-md-6">
        <div class="form-group">
          <div>
            <input type="checkbox"/>
            <div class="state p-danger">
              <div [inlineSVG]="'assets/svg/accept.svg'"></div>
              <label>I will also be available to meet during the event so list me with the available resources</label>
            </div>
          </div>
        </div>
</div>

【问题讨论】:

    标签: html twitter-bootstrap


    【解决方案1】:

    white-space: nowrap 放入您的.state.p-danger 元素中。这将使超出范围的文本转到下一行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-17
      • 1970-01-01
      • 1970-01-01
      • 2013-06-25
      相关资源
      最近更新 更多