【问题标题】:How to put the text in the center怎么把文字放在中间
【发布时间】:2015-09-14 13:04:48
【问题描述】:

如何将文本放在中心轮播(bootstrap)。尝试调整span元素还是?

<div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="img/1.jpg" class="img-responsive" alt="...">
      <div class="carousel-caption">
       <span><strong><p>Aktuelnosti u proizvodnji malina</p></strong>
          </span>
      </div>
    </div> 

【问题讨论】:

  • 跨度 { 颜色:灰色;字体系列:“奥斯瓦尔德”,无衬线;字体大小:50px;}

标签: css twitter-bootstrap carousel


【解决方案1】:
.carousel-caption {
text-align: center;
}

这将使 div 中包含的所有文本居中。如果你只想做跨度,你可以使用

.carousel-caption span {

}

【讨论】:

    【解决方案2】:

    Bootstrap 2.3 有类 text-center ,http://getbootstrap.com/2.3.2/base-css.html

    对于以下版本,您可以为标签元素添加 css 类并使用它

    .text-center{
       text-align: center !important;
      }
    
     <p class="text-center">
    

    【讨论】:

      猜你喜欢
      • 2011-06-02
      • 2017-07-16
      • 2020-07-07
      • 2013-03-23
      • 1970-01-01
      • 1970-01-01
      • 2021-07-14
      • 2021-12-22
      • 2017-11-13
      相关资源
      最近更新 更多