如何在我的默认 bootstrap 轮播中添加 Font Awesome fa-angle-right 图标?

How to add Font Awesome fa-angle-right icon in my default bootstrap carousel?

请看代码。

<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>

在您的 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>

只需在您的页面上包含 font awesome class

<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>

希望对您有所帮助。

为Bootstrap 4 替换

 <span class="carousel-control-next-icon" aria-hidden="true"></span>

使用 FontAwesome 标签

<i class="fa fa-angle-right">