Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Letterpress effect with CSS

Tags:

css

I want to make a letterpress effect like this: http://img208.imageshack.us/img208/6421/letterpress.png in CSS. but I can't seem to find the right text-shadow for it.

Color of the word: #2f4050 Color of the background: #4f6478

i've tried it with:

.letterpress {
    color:#2f4050;
    font-family:Tahoma, Helvetica, Arial, sans-serif;
    font-size:70px;
    font-style:normal;
    font-variant:normal;
    font-weight:normal;
    line-height:normal;
    text-align:center;
    text-shadow:#4f6478 0 1px 5px; 
}

but that doesn't seem to do the trick.

like image 291
Bart De Kimpe Avatar asked May 31 '12 09:05

Bart De Kimpe


2 Answers

.letterpress {
    color:#2f4050;
    font-family:Tahoma, Helvetica, Arial, sans-serif;
    font-size:70px;
    text-align:center;
    text-shadow: 0 1px 1px #fff; 
}

That should do it. Btw. you don't have to declare the "normal" value pairs

like image 55
Alfred Larsson Avatar answered Oct 19 '22 22:10

Alfred Larsson


There are two shadows. Try something like

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

This should give a transparent white shadow to the bottom right and a transparent black inner shadow to the top left.

like image 24
Stefan Avatar answered Oct 19 '22 22:10

Stefan