twitter-bootstrap Bootstrap - 如何在新行中设置内容
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35741012/
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
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 23:41:54 来源:igfitidea点击:
Bootstrap - how to set content in new line
提问by Wojtkovy
I just started to learn Bootstrap - I want to get a result like this:
我刚开始学习 Bootstrap - 我想得到这样的结果:
But without using <br>.
但是没有使用<br>.
At the moment my code looks like:
目前我的代码看起来像:
HTML FILE:
HTML文件:
<div class="container-fluid" id="home">
<div class="row">
<div class="col-md-8">
<div class="row">
<div class="col-md-5"></div>
<div class="col-md-7">
<h1>Upper text here <br> lower text here</h1>
</div>
</div>
<div class="col-md-4"></div>
</div>
</div>
</div>
CSS FILE:
CSS文件:
#home{
text-align: center;}
If I change div class="col-md-5"to less than 5 or higher it doesn't help.
如果我将 div 更改class="col-md-5"为小于 5 或更高,则无济于事。
采纳答案by Satej S
Here you go..
干得好..
<div class="container-fluid" id="home">
<div class="row">
<div class="col-md-8">
<div class="row">
<div class="col-md-5"></div>
<div class="col-md-7">
<h1>Upper text here </h1>
<h1>lower text here </h1>
</div>
</div>
<div class="col-md-4"></div>
</div>
</div>
</div>
CSS
CSS
#home{
text-align: center;}


