简体   繁体   中英

How to get shadow effect in IE6

I am working on a HTML template. Using IE6 for testing not getting shadow like in all other browsers. IE6 doesn't support Box-shadow property. So, How can I get Shadow Effect in working on IE6.

Please help...

You can emulate a CSS shadow using an IE6 DXImageTransform, for example

 filter:
          progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=0,strength=1),
          progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=45,strength=1),
          progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=90,strength=2),
          progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=135,strength=3),
          progid:DXImageTransform.Microsoft.Shadow(color=#cccccc,direction=180,strength=10),
          progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=225,strength=3),
          progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=270,strength=2),
          progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=315,strength=1);

That snippet is from this page read it for more information on how.

Also cbp suggested this guide in the comments, after reading it, I think it's also a good resource, suggesting:

#box {
   zoom: 1;
   filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=5, OffY=5, Color=#ff0000);
}

You can use this:

zoom: 1;
filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=5, OffY=5, Color=#ff0000);

Refer to this site:

http://www.useragentman.com/blog/2011/08/24/how-to-simulate-css3-box-shadow-in-ie7-8-without-javascript/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM