我从引导滑块创建滑块,当我尝试在控制器上添加文本时,文本显示在左侧,当元素位于中心时。文本不在元素中
背景改变为见文(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>
请在问题中添加您的代码。 –
添加代码。感谢您的通知。 – RILEYW1
在片段中,一切都如我所愿。但是在网页上(在Chrome上,也许在其他浏览器上)文本不在元素中。我不知道它为什么会发生。 – RILEYW1