Bootstrap 4自定义无线电表单标签

时间:2018-03-27 13:50:23

标签: twitter-bootstrap forms radio-button bootstrap-4 twitter-bootstrap-4

我的Bootstrap 4.0(稳定)表单出现问题。 我想在我的单选按钮上添加一个标签,但它不是格式化问题。

<div class="form-check form-check-inline">
    <label class="form-check-label">Test</label>
    <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" value="ja" id="handicapped-ja" name="handicapped">
        <label class="form-check-label" for="handicapped">Ja</label>
    </div>
    <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" value="nein" id="handicapped-nein" name="handicapped">
        <label class="form-check-label" for="handicapped">Nein</label>
    </div>
</div>

在Bootstrap 4.0.0-alpha.6中,您可以使用span和自定义控件执行此操作。在4.0稳定它不再工作。是否有一种我无法在doku中找到的新方法呢?

BSP:

<label class="custom-control custom-radio">
    <input id="mixed0" name="cat" type="radio" class="custom-control-input" value="0">
    <span class="custom-control-indicator"></span>
    <span class="custom-control-description">No</span>
</label>

0 个答案:

没有答案