Sha*_*han 5 html css twitter-bootstrap-3
我正在尝试创建一个按钮,上面有一些文字.但是文本没有包裹在按钮上.这就是我所做的.
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-6">
<input type="radio" id="1" class="hidden">
<label for="1" class="btn btn-info btn-preference pull-right">Stability</label>
</div>
<div class="col-md-6 col-sm-6 col-xs-6">
<input type="radio" id="1" class="hidden">
<label for="1" class="btn btn-primary btn-preference text-center">
<span class="break-wo">Freedom and Risk</span>
</label>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
Mr.*_*ien 16
它不是包装,它white-space: nowrap;阻止文本在使用时包装.btn,包含white-space: nowrap;这样的使用white-space: normal;
label[for="1"].btn {
white-space: normal;
}
Run Code Online (Sandbox Code Playgroud)
注意:您的ID值无效,您无法id使用数字启动