htmlbootstrap-4

Change Bootstrap icon color


I print this icon into a table using php code like this:

echo '<button Onclick="" style="border: none; background: none; color:green"><a title="Reenviar" data-toggle="tooltip"><i class="material-icons">&#xE0BE;</i></a></button>';

And I'd ike to change the icon's color. I tried to add the color to the button style; however it does not seem to work.


Solution

  • You should add style to i tag

    <i style = "color:blue;" class="material-icons">&#xE0BE;</i>
    

    also, you can create a css class

    .blue {
        color:blue
    }
    

    and then just add that class to a tag

    <i class="material-icons blue">&#xE0BE;</i>