-2

I want to use icon in css file.

For example like this, there shows R.

.playlist .controls label.stereopan:after {
  content: "R";
}

So, I did like this below.

.playlist .controls label.stereopan:before {
  content: '<i class="fas fa-car"></i>';
}

However it doesn't work, the tag is not parsed and just show the sentence. Is there any workaround?

Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
whitebear
  • 11,200
  • 24
  • 114
  • 237

1 Answers1

1

Car font link : https://fontawesome.com/v5/icons/car?s=solid you need add this code with font-family according your current fontawesome version :

  .playlist .controls label.stereopan:before {
    content: '\f1b9'; 
    font-family: "Font Awesome 5 Free";
    }
Shammi Singh
  • 369
  • 1
  • 4