在radiobuttonlist的标签内渲染输入类型无线电

时间:2014-08-06 11:49:52

标签: asp.net css3 twitter-bootstrap-3 radiobuttonlist

<span><span>
        <input type="radio" value="1377">
        <label>
            Enig</label>
    </span><span>
        <input type="radio" value="1378" title="enig">
        <label>
            Delvist enig</label>
    </span><span>
        <input type="radio">
        <label>
            Hverkenenig eller uenig</label>
    </span><span>
        <input type="radio">
        <label>
            Delvist uenig</label>
    </span><span>
        <input type="radio"><label>
            Uenig</label>
</span></span>

使用CSS3需要使用标签内的输入呈现上面的html吗?

我试过了 BootStrapRadioButtonList没有运气?

上面代码的问题是当浏览器大小改变时,输入单选按钮保持在顶部而文本向下移动!!我如何使用css3渲染标签内的输入?

1 个答案:

答案 0 :(得分:0)

在Bootstrap中,您可以按如下方式格式化无线电控件:

<div class="radio">
  <label>
    <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
    Option one is this and that&mdash;be sure to include why it's great
  </label>
</div>
<div class="radio">
  <label>
    <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
    Option two can be something else and selecting it will deselect option one
  </label>
</div>
<div class="radio">
  <label>
    <input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
    Option three is disabled
  </label>
</div>