Is there an easy way to have css3 text-shadow
's working in IE9? At least a single text shadow would be great. I guess ideally IE8 is supported as well. I'm hoping there's a simple jquery plugin or .htc file which just looks at text-shadow css property of an element and implements it for IE9.
The text-shadow CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its decorations .
CSS Syntaxtext-shadow: h-shadow v-shadow blur-radius color|none|initial|inherit; Note: To add more than one shadow to the text, add a comma-separated list of shadows.
Yes, but not how you would imagine. According to caniuse (a very good resource) there is no support and no polyfill available for adding text-shadow
support to IE9. However, IE has their own proprietary text shadow (detailed here).
Example implementation, taken from their website (works in IE5.5 through IE9):
p.shadow { filter: progid:DXImageTransform.Microsoft.Shadow(color=#0000FF,direction=45); }
For cross-browser compatibility and future-proofing of code, remember to also use the CSS3 standard text-shadow
property (detailed here). This is especially important considering that IE10 has officially announced their intent to drop support for legacy dx filters. Going forward, IE10+ will only support the CSS3 standard text-shadow
.
As IE9 does not support CSS3 text-shadow
, I would just use the filter property for IE instead. Live example: http://jsfiddle.net/dmM2S/
text-shadow:1px 1px 1px red; /* CSS3 */
can be replaced with
filter: Shadow(Color=red, Direction=130, Strength=1); /* IE Proprietary Filter*/
You can get the results to be very similar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With