Javascript 反应引导:复选框左侧的标签

Javascript 反应引导:复选框左侧的标签,javascript,react-bootstrap,Javascript,React Bootstrap,我通过以下方式使用React引导库中的复选框: var checkBtn = ce(bootstrap.Input, {type: "checkbox", label: "Multiplied ", checked: this.isChecked, id: "multBtn", onClick: this.onChange }); 我想在左边贴个标签。我该怎么做呢?我也有同样的问题 我的解决方法是不使用react引导(例如使用jsx)

我通过以下方式使用React引导库中的复选框:

var checkBtn = ce(bootstrap.Input, {type: "checkbox", label: "Multiplied ",
checked: this.isChecked, id: "multBtn", onClick: this.onChange });

我想在左边贴个标签。我该怎么做呢?

我也有同样的问题

我的解决方法是不使用react引导(例如使用jsx):


{fieldName+':'}
我知道我没有回答你的确切问题。
希望有人能给出一个真实的答案。

在有人和我分享这个问题之前,他在另一篇帖子中回答了这个问题

我使用flex通过改变行方向来解决这个问题

HTML:

输出:

JSFiddle:

你可以找到我原来的帖子/答案

我回答了这个问题,但意识到这里也有人问:)
<div className={'form-group'}>
  <label
    className={'control-label'}
    htmlFor={fieldName}
  >
    {fieldName + ':'}
  </label>
  <input
    type='checkbox'
    id={fieldName}
    name={fieldName}
    checked={fieldValue}
  />
</div>
<div class="checkbox">
    <label title="">
        <input type="checkbox" value="">
        Did not perform
    </label>
</div>
div.checkbox {
  display: inline-block;
  /*ie7 -- start*/
  *display: inline;
  zoom: 1;
}

div.checkbox > label {
  display: flex;
  flex-direction: row-reverse;
}