M
M
Mesuti2018-01-31 22:56:35
css
Mesuti, 2018-01-31 22:56:35

How to change icon font to jpg image?

Hey!
How can I change the font icon to an image?
On the example of the CodePen accordion
Tried to change this

a:after {
  content: '\e909';
}

On this
a:after {
  background-image: url(plus.jpg)
}

And it doesn't help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
weranda, 2018-01-31
@Mesuti

Add the width and height of the block to which you will set the background image. There are several in your code.

S
Stalker_RED, 2018-01-31
@Stalker_RED

a:after {
  content: '';
  width: 50px;
  height: 50px;
  position: absolute;
  background-image: url(https://i.imgur.com/rWGmd4C.png)
}

https://jsfiddle.net/Lhhh71x8/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question