自动换行不工作3 [英] Word-wrap not working in bootstrap 3
本文介绍了自动换行不工作3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图创建一个按钮,其上有一些文本。但文本不包裹在按钮上。
这是我做的。
< div class =form-group>
< div class =col-md-6 col-sm-6 col-xs-6>
< input type =radioid =1class =hidden>
< label for =1class =btn btn-info btn-preference pull-right>稳定性< / label>
< / div>
< div class =col-md-6 col-sm-6 col-xs-6>
< input type =radioid =1class =hidden>
< label for =1class =btn btn-primary btn-preference text-center>
< span class =break-wo>自由和风险< / span>
< / label>
< / div>
< / div>
这里是 link for bootfly
解决方案
这不是包装,而是 :nowrap; 其中包含
white-space:nowrap; code> so use
white-space:normal;
label [for =1]。btn {
white-space:normal;
}
: code>值无效,您不能使用数字开始 id
i am trying to create a button having some text over it. But the text are not wrapping on the button. Here is what i have done.
<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>
Here is the Link for bootfly
解决方案
It's not the wrap, it's white-space: nowrap;
which is preventing the text to wrap when used .btn
which contains white-space: nowrap;
so use white-space: normal;
label[for="1"].btn {
white-space: normal;
}
Note: Your ID
value is invalid, you cannot start an id
with a number
这篇关于自动换行不工作3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文