简体   繁体   中英

How can I get the icons by content query?

I am modifying a background slider, but in the 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?

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

The content CSS property is used with the ::before and ::after pseudo-elements to generate content in an element. Objects inserted using the content property are anonymous replaced elements. https://developer.mozilla.org/en-US/docs/Web/CSS/content

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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