Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change fonts only opacity

Tags:

css

Hi all I need only change fonts opacity in css is any way for this? p.s. I need only change fonts

like image 454
Val Do Avatar asked Feb 13 '23 06:02

Val Do


2 Answers

All you need to do is set the alpha channel on the p tag. So for example:

p { color: rgba(0,0,0,0.3); }
like image 61
Andy Holmes Avatar answered Feb 24 '23 00:02

Andy Holmes


Use RGB instead of Hexadecimal for the colour of your text, then add opacity to this like below. (this is for grey text with opacity)

p {
    color: rgba(85, 85, 85, 0.8);
}

Change the 0.8 depending on how much opacity you require, the lower the number the more opacity.

like image 29
Jay Avatar answered Feb 24 '23 00:02

Jay