Val Do
Val Do

Reputation: 2695

How to change fonts only opacity

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

Upvotes: 4

Views: 82

Answers (3)

Andy Holmes
Andy Holmes

Reputation: 8077

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); }

Upvotes: 6

Jay
Jay

Reputation: 792

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.

Upvotes: 3

user3561092
user3561092

Reputation: 47

Why dont You put that text inside special div with transparent background and then manipulate its opacity ?

Upvotes: -1

Related Questions