[英]Binding FontAwesome to a ::before with unicode - displays crypdo-icon
I am trying to include FontAwesome to an::before-element.我正在尝试将 FontAwesome 包含到 ::before-element 中。 The include to the website worked (I have other Icons in an i-element on the website) but the unicode-way won't work.
网站的包含工作正常(我在网站的 i 元素中有其他图标)但 unicode 方式不起作用。
I've trying to add an icon for the previous-button in fontAwesome like that:我试图在 fontAwesome 中为上一个按钮添加一个图标,如下所示:
.owl-carousel .owl-nav button.owl-next, .owl-carousel .owl-nav button.owl-prev, .owl-carousel button.owl-dot {
font-family: "fontAwesome";
}
.owl-carousel .owl-nav .owl-prev::before{
content: "\f053";
font-family: FontAwesome;
margin-right:10px;
}
But it just shows up like that:但它就是这样显示的:
I tested adding height and width, making it a block-element.. nothing seems to work.我测试了添加高度和宽度,使其成为一个块元素。似乎没有任何效果。 I am using the Contao CMS.
我正在使用 Contao CMS。
When I insert <i class="fas fa-chevron-left"></i>
before your button via dev tools and then inspect it, it shows the font-family for the i
element as "Font Awesome 5 Free"
- you used FontAwesome
for your button ::before
element instead.当我通过开发工具在你的按钮之前插入
<i class="fas fa-chevron-left"></i>
然后检查它时,它显示i
元素的字体系列为"Font Awesome 5 Free"
- 你将FontAwesome
用于您的按钮::before
元素。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.