我坚持在引导程序4中制作旋转木马。
它工作得很完美,但它没有拍出正确的按钮和左按钮只有3个柱子可以切换到它们但我不知道如何添加看起来像这样的按钮< ; >
这是我的按钮代码
<a class="left carousel-control" href="#firstCarousel" role="button" data-slide="prev">
<span class="icon-prev" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#firstCarousel" role="button" data-slide="next">
<span class="icon-next" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
答案 0 :(得分:1)
阅读Bootstrap docs ..
Bootstrap 4不再包含Glyphicons(icon-*
)。
<a class="carousel-control-prev" href=".." role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href=".." role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
答案 1 :(得分:0)
如果您在引导程序中使用了很棒的字体,则可以这样替换:
<span class="icon-prev" aria-hidden="true"></span>
With
<i class="fas fa-arrow-left"></i>
<span class="icon-next" aria-hidden="true"></span>
With
<i class="fas fa-arrow-right"></i>