can we fill color in toggle-off icon of font awesome?

637 views Asked by At

toggle-off font awesome icon

<i class="fa fa-toggle-off" style="color:red" ></i>

currently , I am using above class and style for toggle off icon

I want to show it as shown below

enter image description here

How can I do that?

Thanks in advance.

2

There are 2 answers

0
Velid Duranović On BEST ANSWER

With that icon you cannot get what you want. As an alternative, you can use fas fa-toggle-on and rotate it for 180deg. CodePen: https://codepen.io/kitchup/pen/yYeMXE

//HTML
<span class="toggle-off">
  <i class="fas fa-toggle-on"></i>  
</span>

//CSS
.toggle-off{
  display: inline-block;
  font-size: 30px;
  color: red;
  transform: rotate(180deg);
}
0
Fares On
<span style="color: red">
    <i class="fa fa-toggle-off"></i>
</span>

You'll need to use something like this.