2016-02-05 64 views
-2

我从引导滑块创建滑块,当我尝试在控制器上添加文本时,文本显示在左侧,当元素位于中心时。文本不在元素中

现场演示:http://povilasc.lt/shop/

photo背景改变为见文(1和2)

HTML:

.carousel-indicators { 
 
    text-align: center; 
 
} 
 

 
.carousel-indicators li { 
 
    width: 20px; 
 
    display: inline-block; 
 
    height: 20px; 
 
    line-height: 20px; 
 
    font-size: 12px; 
 
    padding: 0; 
 
    margin: 2px; 
 
    color: #fff; 
 
    border: 0; 
 
    border-radius: 0; 
 
    background-color: #222; 
 
    text-align: center; 
 
}
<ol class="carousel-indicators"> 
 
\t <li data-target="#carousel-2" data-slide-to="0" class="active">1</li> 
 
\t <li data-target="#carousel-2" data-slide-to="1">2</li> 
 
</ol>

+0

请在问题中添加您的代码。 –

+0

添加代码。感谢您的通知。 – RILEYW1

+0

在片段中,一切都如我所愿。但是在网页上(在Chrome上,也许在其他浏览器上)文本不在元素中。我不知道它为什么会发生。 – RILEYW1

回答

1

在Safari构建在元件检查员显示我,你的.carousel指标li有风格“text-indent:-999px;”应用。

添加到您的.carousel-indicators li样式text-indent:0px;它应该工作。

此致敬礼。

+0

谢谢,这工作。我根据自己的风格将其删除,但忘记在引导程序中删除。 – RILEYW1

+0

@ RILEYW1我可以给你一个提示,绝不改变或更新你的原始引导文件。始终覆盖您自己的“app.css”文件中的默认库/框架CSS代码。 – Peter

相关问题