CSS Twitter 引导程序和复选框列表或单选按钮列表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8531279/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 02:23:36  来源:igfitidea点击:

Twitter bootstrap and Checkboxlist or Radiobutton list

csscheckboxlisttwitter-bootstrap

提问by Deeptechtons

I got a markup like below and without any styling, the Twitetr Bootstrap css seems to mess something such that the checkbox falls below the label text.What is the thing i got to change

我得到了一个像下面这样的标记并且没有任何样式,Twitetr Bootstrap css 似乎弄乱了一些东西,使得复选框落在标签文本下方。我要改变的是什么

<ul >
    <li>
        <label>1<input type="checkbox" id="chk1" name="chk1"></label>
    </li>
    <li>
        <label>2<input type="checkbox" id="chk2" name="chk2"></label>
    </li>
</ul>

screenshot http://img525.imageshack.us/img525/3390/savec.jpg

截图 http://img525.imageshack.us/img525/3390/savec.jpg

回答by fiat

inputs-list doesn't seem to be a css class anymore. I used class="nav nav-list"instead.

输入列表似乎不再是一个 css 类。我用了class="nav nav-list"

回答by Interrobang

Add the class "inputs-list" to your <ul>. Everything will magically work.

将类“输入列表”添加到您的<ul>. 一切都会神奇地工作。