Html 使用引导3对齐同一行上的复选框
我使用的是Bootstrap3模式,在这里我动态生成复选框。它很好用。我需要对齐同一行上的复选框。所以我用了Html 使用引导3对齐同一行上的复选框,html,twitter-bootstrap,layout,angularjs-material,Html,Twitter Bootstrap,Layout,Angularjs Material,我使用的是Bootstrap3模式,在这里我动态生成复选框。它很好用。我需要对齐同一行上的复选框。所以我用了 <div class="row" > <div ng-repeat="item in selectedFields"> <md-checkbox ng-model="checkbox" class="col-xs-12" aria-label={{item.name}
<div class="row" >
<div ng-repeat="item in selectedFields">
<md-checkbox ng-model="checkbox" class="col-xs-12" aria-label={{item.name}}>
{{item.name}}
</md-checkbox>
</div>
</div>
是因为你用的是col-xs-12而不是col-xs-4吗
<div class="row" >
<div ng-repeat="item in selectedFields">
<md-checkbox ng-model="checkbox" class="col-xs-4" aria-label={{item.name}}>
{{item.name}}
</md-checkbox>
</div>
是因为你用的是col-xs-12而不是col-xs-4吗
<div class="row" >
<div ng-repeat="item in selectedFields">
<md-checkbox ng-model="checkbox" class="col-xs-4" aria-label={{item.name}}>
{{item.name}}
</md-checkbox>
</div>
我认为问题在于您在md checkbox标记中使用的类。您已经提供了class=col-xs-12作为类,然后它将分配整行以显示该特定组件。将类更新为col-xs-3-4行或col-xs-4-3行,您将以内联方式获得它 除此之外,还有另一种方法可以让它工作 下面是一个简单的表单输入示例,您可以根据需要进行更新
<div class="container">
<h2>Form control: inline checkbox</h2>
<form>
<label class="checkbox-inline">
<input type="checkbox" value="">Option 1
</label>
<label class="checkbox-inline">
<input type="checkbox" value="">Option 2
</label>
<label class="checkbox-inline">
<input type="checkbox" value="">Option 3
</label>
</form>
</div>
希望它能起作用
祝你好运 我认为问题在于您在md checkbox标记中使用的类。您已经提供了class=col-xs-12作为类,然后它将分配整行以显示该特定组件。将类更新为col-xs-3-4行或col-xs-4-3行,您将以内联方式获得它 除此之外,还有另一种方法可以让它工作 下面是一个简单的表单输入示例,您可以根据需要进行更新
<div class="container">
<h2>Form control: inline checkbox</h2>
<form>
<label class="checkbox-inline">
<input type="checkbox" value="">Option 1
</label>
<label class="checkbox-inline">
<input type="checkbox" value="">Option 2
</label>
<label class="checkbox-inline">
<input type="checkbox" value="">Option 3
</label>
</form>
</div>
希望它能起作用
祝你好运 你能通过解释你如何更改问题代码来改进这个答案吗?你能通过解释你如何更改问题代码来改进这个答案吗?