Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css text shadow

Tags:

css

styles

I'm working on a website and I want to add some shadow to my text, is there an easy way to do this using only css? i tried placing a darker clone of the text under it, but that would be hard on different sizes.

like image 650
Life Knife Avatar asked Sep 02 '25 15:09

Life Knife


2 Answers

You can achieve this using the CSS3 text-shadow property. The general format for specifying this is:

text-shadow: *left-offset* *top-offset* *blur-distance* *color*;

Example Usage:

text-shadow: 2px 2px 1px #000000;

You can create multiple shadows by separating their definitions with commas:

text-shadow: 2px 2px 1px #000000, -2px -2px 1px #111111;

Older versions of IE do not support this property, though; you need to use a filter:

filter: DropShadow(Color=#000000, OffX=2, OffY=2);

Where you replace the values with whatever your preference is.

Note: The answer to your question can be found quite easily using the great search engine Google. Please try that next time before asking a question.

Another note: You really don't have to mention that the website you're working on is an adult website. It's completely irrelevant and might even be a bit dislikable to some users.

Welcome to Stackoverflow, though! I hope that helped!

like image 174
Chris Avatar answered Sep 05 '25 07:09

Chris


you can use css text-shadow any times you want on a text:

text-shadow:1px 0px 2px grey, -1px 0px 2px grey, 0px 1px 2px grey, 0px -1px 2px grey;

will create a shadow whole around the text.

like image 28
Dariush Jafari Avatar answered Sep 05 '25 07:09

Dariush Jafari