请看一下代码。
<a class="carousel-control-prev" href="#my-slider" 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="#my-slider" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
答案 0 :(得分:1)
在HTML中包含FA CSS,然后使用<i class="fas fa-angle-right">
添加箭头。
fa or fas = Font Awesome Solid
far = Font Awesome Regular
fal = Font Awesome Light
fab = Font Awesome Brands
<i class="fa fa-camera-retro"></i> <!-- version 4's syntax -->
<i class="fas fa-camera-retro"></i> <!-- version 5's syntax -->
<i class="far fa-camera-retro"></i> <!-- example: regular style of camera-retro -->
<i class="fal fa-camera-retro"></i> <!-- example: light style of camera-retro -->
<link href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" rel="stylesheet"/>
<a class="carousel-control-prev" href="#my-slider" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span>Previous</span>
</a>
<a class="carousel-control-next" href="#my-slider" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span><i class="fas fa-angle-right"></i> Next</span>
</a>
答案 1 :(得分:0)
只需在页面上添加font awesome类
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css">
<a class="carousel-control-prev" href="#my-slider" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span><i class="fa fa-angle-left"></i>Previous</span>
</a>
<a class="carousel-control-next" href="#my-slider" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span>Next<i class="fa fa-angle-right"></i></span>
</a>
希望这会有所帮助。
答案 2 :(得分:0)
对于Bootstrap 4替换
<span class="carousel-control-next-icon" aria-hidden="true"></span>
带有FontAwesome标记
<i class="fa fa-angle-right">