Dashicons 是自带于 WordPress 核心中的一个图标字体库,也是刚刚偶然发现的Font Awesome的平替。使用方法:

在主题中加载Dashicons,在functions.php文件中插入:

wp_enqueue_style( 'dashicons' );

用法与Font Awesome一样,比如在css中定义:

font-family: 'dashicons';
content: "\f323";

由于是WordPress出品,管理后台同款,感觉上比额外加载Font Awesome要更轻便。

图标集查看地址:https://developer.wordpress.org/resource/dashicons/

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit exceeded. Please complete the captcha once again.

 

Back to Top