如何在wordpress上使用内联css添加自定义图标?

时间:2017-07-19 04:49:47

标签: css wordpress svg icons font-awesome

我想添加一个玻璃门图标。你可以在braunweiss.net找到我的网站。我的主题使用fontawesome,它目前不支持glassdoor图标。所以我尝试使用以下代码添加图像:

.social-menu li a [href * =" glassdoor.com"] :: before {content:url(http://braunweiss.net/wp-content/uploads/2017/07/glassdoor-2-1.png);}

然而,它看起来很糟糕,它不可自定义,并且当它像字体一样盘旋时它不会改变。我已经读过在内联css中使用svg,但无法弄清楚如何做到这一点。在这里,我获得了我使用的glassdoor图标:https://materialdesignicons.com/(向下滚动,图标按字母顺序排列)。

有更好的方法让图标显示出来吗?我只能自定义css或在wordpress上添加我主题的php文件的代码。感谢。

1 个答案:

答案 0 :(得分:0)

您是否尝试过使用SVG? https://github.com/FortAwesome/Font-Awesome/issues/6422(SVG LINK就在这里)

https://css-tricks.com/using-svg/图标SVG操作方法。