简体   繁体   中英

How To Put FontAwesome In Inner.html

How am I suppose to put fontawesome icon ie

`<i class="fa fa-info" aria-hidden="true"></i>

`in a place of "Info" in below inner.html
Below is my javascript

dlg.innerHTML = "<span class='alert-headingg'>Info<" + "/span>";

试试这个,您只需将图标元素放入跨度即可。

dlg.innerHTML = "<span class='alert-headingg'><i class="fa fa-info" aria-hidden="true"></i></span>";
<i class="icon-github"></i>

div.github:before
{
   content: "\f09b";
   font-family: FontAwesome;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM