Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 引导radiobox如何与标签对齐_Html_Forms_Css_Twitter Bootstrap 3 - Fatal编程技术网

Html 引导radiobox如何与标签对齐

Html 引导radiobox如何与标签对齐,html,forms,css,twitter-bootstrap-3,Html,Forms,Css,Twitter Bootstrap 3,我面临的问题如下图所示: 奇怪的是,label和radiobox不在“同一行”,我的代码是: <div class="form-group"> <label class="col-sm-3 control-label"><small><span class="text-danger glyphicon glyphicon-asterisk" aria-hidden="true"></span></small>飲食</l

我面临的问题如下图所示: 奇怪的是,label和radiobox不在“同一行”,我的代码是:

<div class="form-group">
<label class="col-sm-3 control-label"><small><span class="text-danger glyphicon glyphicon-asterisk" aria-hidden="true"></span></small>飲食</label>
<div class="col-sm-8">
<div class="input-group">
<label><input type="radio" name="food" value="1" id="food" checked> 葷 </label>
<label><input type="radio" name="food" value="2" id="food"> 素 </label>
<label><input type="radio" name="food" value="3" id="food"> 不需要</label>
</div>
</div>
</div>

飲食
葷 
素 
不需要

尝试将“radio inline”类添加到控件标签,它应该与其他标签正确对齐

试试这个:

    <label class="radio inline control-label">Some label</label>
一些标签

使用css垂直对齐声明:)嗯。只需使用类并在css中调用它,然后使用垂直对齐:文本。