简体   繁体   English

用材质图标更改 JStree 图标

[英]change JStree icon with material icons

I can change JStree icon with fontawesome and glyphicon using code like this:我可以使用如下代码更改带有 fontawesome 和 glyphicon 的 JStree 图标:

<li data-jstree='{"icon":"fa fa-user"}'>
<li data-jstree='{"icon":"glyphicon glyphicon-print"}'>

How to use Material Icons ?如何使用材质图标

I tried我试过了

<li data-jstree='{"icon":"material-icons add"}'>

But doesn't work但不起作用

I can do it by including this stylesheet:我可以通过包含这个样式表来做到这一点:

https://github.com/Angelmmiguel/material_icons/blob/master/app/assets/stylesheets/material_icons_unicode.css.erb https://github.com/Angelmmiguel/material_icons/blob/master/app/assets/stylesheets/material_icons_unicode.css.erb

after I include above file as CSS I can use code below to use material-icons:在我将上述文件包含为 CSS 之后,我可以使用下面的代码来使用材质图标:

<li data-jstree='{"icon":"material-icons add"}'>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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