2015-06-27 98 views
1

如何把文本放在中心輪播(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> 
+0

範圍 {color:grey; font-family:'Oswald',sans-serif; font-size:50px;} – dejan

回答

1
.carousel-caption { 
text-align: center; 
} 

這將圍繞包含在div任何文本。如果你只是想要做的跨度可以使用

.carousel-caption span { 

} 
1

引導2.3具有類文本的中心,http://getbootstrap.com/2.3.2/base-css.html

爲以下版本中,你可以添加CSS類標籤的元素,並用它

.text-center{ 
    text-align: center !important; 
    } 

<p class="text-center">