简体   繁体   English

如何通过内容查询获取图标?

[英]How can I get the icons by content query?

I am modifying a background slider, but in the css: 我正在修改背景滑块,但在CSS中:

span.cbp-binext:before {
content: "\e000";}

The only thing is that I get squares. 唯一的事情是我得到正方形。 Can I replace them with an image (.png) or is it possible to get the icons the as here in the example? 我可以将它们替换为图片(.png)还是可以像示例中所示的那样获取图标?

Here is the code. 是代码。

Regards Jason. 问候杰森。

content:url(urltomedia);

在此处阅读有关内容: http : //www.w3schools.com/cssref/pr_gen_content.asp

Use 采用

content: url('you image url');

like 喜欢

span.cbp-binext:before {
content: url("http://i.stack.imgur.com/tKsDb.png");
}

JSFiddle JSFiddle

The content CSS property is used with the ::before and ::after pseudo-elements to generate content in an element. content CSS属性与:: before和:: after伪元素一起使用,以在元素中生成内容。 Objects inserted using the content property are anonymous replaced elements. 使用content属性插入的对象是匿名替换的元素。 https://developer.mozilla.org/en-US/docs/Web/CSS/content https://developer.mozilla.org/zh-CN/docs/Web/CSS/content

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

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