为什么 Bootstrap 4 Glyphicon 不显示

我的项目中包含以下引导 CDN

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

我尝试在我的 php 脚本中以以下方式回显字形

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

但什么都没有出现。有谁知道为什么?


拉丁的传说
浏览 279回答 2
2回答

慕勒3428872

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

收到一只叮咚

Bootstrap 4 没有自己的图标库,BS4 不支持 Bootstrap 3 中的 Glyphicons。但是,有许多免费的图标库可供选择,例如 Font Awesome 和 Google Material Design Icons。
打开App,查看更多内容
随时随地看视频慕课网APP