CSS3 Box Shadow Effect for IE8?

后端 未结 3 409
孤街浪徒
孤街浪徒 2021-01-27 01:29

I have the following style to get this effect:

It works in IE9 and Chrome but not in IE8. What should I change to make it work in IE8.

Please note that I have a

3条回答
  •  孤独总比滥情好
    2021-01-27 02:11

    IE8 does not natively support box-shadow. You can use the amazing CSS3 PIE library for that.


    Beware however, that this does not exactly replicate box-shadow. Mainly, if your image has any transparency to it, the shadow behind the element will leak through:

    The shadow shape rendered by PIE is, unlike other browsers, opaque in the area behind the element's background. This means that if your element has a transparent or semi-transparent background, the opaque shadow will show through. To avoid this you must [..] give the element a non-transparent background

    See: http://css3pie.com/documentation/supported-css3-features/#box-shadow

提交回复
热议问题