How to create text overlay in CSS?

I am looking to create a text overlay similar to a link. If you see this, the color of the text contrasts with the color of the div, gives the feeling that the text is superimposed by some kind of outer layer of the main color of the div. How to achieve this effect?

+3
source share
2 answers

I used the Chrome Inspector for you. This is the style for numbers:

.metro .count {
    /*...*/
    color: rgba(0, 0, 0, 0.20);
}

You can verify this yourself, simply:

  • in Chrome, right-click the number and check item
  • in Firefox, use Firebug
  • in Internet Explorer (version 8+) by pressing F12
  • Other browsers also have their equivalents.

Read about CSS3 rgba()here.

"a" , , , . .

+5

- text-shadow - . CSS,

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

rgba(0, 0, 0, 0.3) 30%.

0

All Articles