4

I have the following bootstrap CDN included in my project

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

And I tried to echo glyphicons the following way within my php script

echo '<div class="col-sm"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>'.$deviceName.'</div>';

But nothing is showing up. Does anyone knows why?

Anu
  • 1,123
  • 2
  • 13
  • 42

2 Answers2

9

Use FontAwesome Icon Like This

@import "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.css";
      <p>
          <i class="fa fa-spinner fa-spin"></i>
          <i class="fa fa-refresh fa-spin"></i>
          <i class="fa fa-cog fa-spin"></i>
      </p>
      <br>
      <p>
          <i class="fa fa-quote-left fa-2x pull-left fa-border"></i>
          Use a few styles together and you'll have easy pull quotes or a great introductory article icon.
      </p>
      <br>
      <h2>Stacked Icons</h2>
      <p>
          <span class="fa-stack fa-lg">
              <i class="fa fa-square-o fa-stack-2x"></i>
              <i class="fa fa-twitter fa-stack-1x"></i>
      </span>
      fa-twitter on fa-square-o<br>
      <span class="fa-stack fa-lg">
        <i class="fa fa-circle fa-stack-2x"></i>
        <i class="fa fa-flag fa-stack-1x fa-inverse"></i>
      </span>
      fa-flag on fa-circle<br>
      <span class="fa-stack fa-lg">
        <i class="fa fa-square fa-stack-2x"></i>
        <i class="fa fa-terminal fa-stack-1x fa-inverse"></i>
      </span>
      fa-terminal on fa-square<br>
      <span class="fa-stack fa-lg">
        <i class="fa fa-camera fa-stack-1x"></i>
        <i class="fa fa-ban fa-stack-2x text-danger"></i>
      </span>
      fa-ban on fa-camera
      </p>

See Code Code Link

Kiran Mistry
  • 2,614
  • 3
  • 12
  • 28
4

Bootstrap 4 does not have its own icon library, Glyphicons from Bootstrap 3 are not supported in BS4. However, there are many free icon libraries to choose from, such as Font Awesome and Google Material Design Icons.

KuldipKoradia
  • 3,005
  • 7
  • 20