12

Is it possible to make the font (font-color) transparent while using any color like black or white? Just have the font slowly disappear, like display:none. Thanks

Steve
  • 542
  • 1
  • 4
  • 12
Sarfaraz Alam
  • 149
  • 2
  • 2
  • 9

2 Answers2

21

You can use css property

opacity: 0; 

and you will not be able to select the text,

or

color: transparent;

and you will have the chance to select the text.

If you want to make this slowly look at jQuery functions .fadeOut() http://api.jquery.com/fadeOut/ or .animate() http://api.jquery.com/animate/

Aida_Aida
  • 541
  • 1
  • 3
  • 16
5

You can use RGBA colors, where the last level is alpha (transparency), e.g.:

color:rgba(255,0,0,0.3);

Which is red at 30% opacity. RGBA values are supported by IE9+, Firefox 3+, Chrome, Safari, and in Opera 10+.

You also have HSLA, e.g.:

color: hsla(0,100%,50%,0.6);

Again, the last value, alpha, sets the transparency

SW4
  • 69,876
  • 20
  • 132
  • 137