Home > database >  I can't see my arrow icon that i added in bootstrap
I can't see my arrow icon that i added in bootstrap

Time:09-29

i wanted to add this arrow-up-circle icon to my footer, but when i add it i can't see it, this is my html code:

    <html>
       <head>
          <link 
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
       </head>
       <body>
            <!-- Footer -->
            <footer class="p-5 bg-dark text-white text-center position-relative">
                <div class="container">
                    <p class="lead">Copyright &copy; 2021 GhDesign isLazy</p>
                    <a href="#" class="position-absolute bottom-0 end-0 p-5">
                        <i class="bi bi-arrow-up-circle "></i>
                    </a>
                </div>
            </footer>
       </body>
    </html>

CodePudding user response:

You also need to load the icon font to use bootstrap's icons:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">

or if you don't want to load the whole font, just use the SVG instead:

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-circle" viewBox="0 0 16 16">
  <path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"/>
</svg>

CodePudding user response:

Just make sure to include the icons library:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<i class="bi bi-arrow-up-circle"></i>

CodePudding user response:

You don't have the good CDN imported, you need the bootstrap-icons like the code below :

<html>

<head>
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
</head>

<body>
  <!-- Footer -->
  <footer class="p-5 bg-dark text-white text-center position-relative">
    <div class="container">
      <p class="lead">Copyright &copy; 2021 GhDesign isLazy</p>
      <a href="#" class="position-absolute bottom-0 end-0 p-5">
        <i class="bi bi-arrow-up-circle "></i>
      </a>
    </div>
  </footer>
</body>

</html>

  • Related