bootstrap4 icon is not displayed in bootstrap_treeview causes and solutions

1. bootstrap4 icon is not displayed in bootstrap_treeview reasons

  Great God viewed a blog, through their own test, plug-in dependencies:

bootstrap/3.3.7
jquery/3.3.1
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap-treeview/1.2.0/bootstrap-treeview.min.js"></script>
 Because the plug-in version of the icon with 3, and the bootstrap 4 separate plug-and yet the icon, so you need to add these files manually icon. 
 (1) But after viewing bootstrap tutorial "rookie" Course, before bootstrap4 icon font used is "Glyphicons Halfings", download site at https://glyphicons.com/ find the icon file to file charges, after viewed .

  

  (2) later found bootstrap also be referenced fontawesome font icon, download site at http://fontawesome.dashgame.com/

    Was added to a css, js sibling directory location by reference the following code after downloading the css:

 1 @font-face {
 2       font-family: 'FontAwesome';
 3       src:  url('../font/bootstrap/glyphicons-halflings-regular.eot');
 4       src:  url('../fontawesome-free-5.12.1-web/webfonts/fa-brands-400.eot') format('embedded-opentype'),
 5         url('.../fontawesome-free-5.12.1-web/webfonts/fa-brands-400.ttf') format('truetype'),
 6         url('../fontawesome-free-5.12.1-web/webfonts/fa-brands-400.woff') format('woff'),
 7         url('../fontawesome-free-5.12.1-web/webfonts/fa-brands-400.woff2') format('woff2'),
 8         url('../fontawesome-free-5.12.1-web/webfonts/fa-brands-400.svg') format('svg');
 9       font-weight: normal;
10       font-style: normal;
11   }
12 }

  (3) If you need just a few of the icon image, you can go to the https://www.iconfont.cn/ go look.

 

Guess you like

Origin www.cnblogs.com/smxbo/p/12356591.html