0

Is it possible to change the colour of the transparent parts of the font-awesome icons I am using?

Currently my page looks like this, however I would like it to look Like this (I used red for clarity's sake)

I read something about gradients but this would extend too far out and would show outside the transparant space

Tyadan
  • 123
  • 1
  • 6

2 Answers2

0

You can change the color by using color property but the icons that are in images can't be changed by this property. But if you use these icons <i class="fas fa-envelope"></i>, <i class="fab fa-linkedin-in"></i> instead of that are in image then you can change the color by using color property

Usman
  • 463
  • 2
  • 9
-1

use the below code:

HTML & CSS code

.linkedin-icon{
                color: red;
        }
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ"
    crossorigin="anonymous">
    <title>Document</title>
</head>
<body>
    <span class="fa-stack">
        <i class="linkedin-icon fab fa-linkedin fa-stack-2x"></i>        
    </span>
</body>
</html>
Zeeshan Ahmad Khalil
  • 793
  • 1
  • 12
  • 29
Abhishek Raj
  • 480
  • 4
  • 14