-4

I have some text with the following css:

.text-description-header {
    font-size: 250%;
    color: white;
    text-shadow: 0 1px 0 black;
}

As you can see, it has a black shadow.

Question

Is it possible to make the shadow opaque?

Thanks

Richard
  • 8,193
  • 28
  • 107
  • 228

2 Answers2

1

Use of rgba(0,0,0,0.2); or hsla(0,0%,0%,0.2)

 .text-description-header {
        font-size: 250%;
        color: white;
        text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
Ehsan
  • 12,655
  • 3
  • 25
  • 44
1

Specify the color in RGBA (Red,Green,Blue,Alpha)

Where Alpha is the opacity (0 - 1)

Something like:

text-shadow: 0 1px 0 rgba(0,0,0,0.5);

For half transparent black shadow.

Jones Joseph
  • 4,703
  • 3
  • 22
  • 40