twitter-bootstrap 文本太大时如何更改bootstrap的标签类以断行?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23831755/
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
How to change the label class of bootstrap to break line when text is too big?
提问by gog
I'm using the bootstrap do make an html page and I have this code:
我正在使用引导程序做一个 html 页面,我有这个代码:
<h4> <span class="label label-warning">Observation: @document.Observation</span></h4>
When this Observation variable comes longer I would like to break a line, how can I do that?
当这个观察变量变长时,我想换一条线,我该怎么做?
回答by Paul
Bootstrap Labels aren't really designed for multiple lines/long bodies of text but something like the following would work:
Bootstrap 标签并不是真正为多行/长文本体设计的,但类似以下的内容会起作用:
http://www.bootply.com/rUZ6CHwj7k
http://www.bootply.com/rUZ6CHwj7k
An alert might be more suitable? <div class="alert alert-warning">...</div>the .labelstyle is great for inline where the alert is better for block styles & more text.
警报可能更合适?<div class="alert alert-warning">...</div>该.label样式非常适合内联,其中警报更适合块样式和更多文本。
More here:
更多在这里:

