开发者

Add the Shadow effect to fonts using CSS

开发者 https://www.devze.com 2023-01-24 14:41 出处:网络
Hey everyone, Again I need your help :D Is it possible to add the shadow effect to the text in HTML using only CSS ?? I\'m working on a project that has a lot of buttons and I need to find a way to a

Hey everyone, Again I need your help :D

Is it possible to add the shadow effect to the text in HTML using only CSS ?? I'm working on a project that has a lot of buttons and I need to find a way to add the shadow effect to the text in them without using images and to be compatible with the most used brow开发者_运维问答sers. I tried using the "text-shadow" property in the CSS but it didn't work.

Thanks


Yes, here is the syntax:

text-shadow: 2px 2px 2px #000;

Generally:

text-shadow: x y blur color;

and a link to the page I found it: http://www.css3.info/preview/text-shadow/.


Yes. And you can find several answer to your question via Google, but this is one of the bests: http://www.kremalicious.com/2008/04/make-cool-and-clever-text-effects-with-css-text-shadow/


As IE is still the most used browser, I´m afraid the answer is no.

However, if you are willing to let go of your requirement of only css, you can use for example this jQuery plugin.


While this question has been answered already, I thought it worth adding that it's possible to add support for IE8, using the following filters:

filter: glow(color=#ffff00,strength=3);
filter: dropshadow(color=#ffff00,offX=5,offY=5);

Unfortunately this only seems to work if the element has display: block; and a defined height (or) width; or the element has position: absolute; which is a little less than wonderful.

Citing my source for this: Text-shadow, at: http://www.howtocreate.co.uk/textshadow.html, although I'm unable to verify the accuracy, since I don't routinely use IE (any version) or Windows, given the chance.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号