Microsoft Shadow Filter - No Direction?
Is it possible to use this filter to cr开发者_C百科eate a directionless drop shadow (The shadow appears on all sides of a div?)
filter: progid:DXImageTransform.Microsoft.Shadow(color='#969696', Direction=145, Strength=3);
It would create something similar to:
box-shadow: 0 0 4px #969696;
There is not a cross-browser semantic way to approach creating box-shadow functionality in IE. The .Shadow() filter you have is the closest you're going to get.
Also, this page should prove to be an informative read.
Yes it is possible, just use multiple .shadow declarations each with a different direction.
This will give you something close to what you are looking for - the various strengths are used to blend the edges a little better.
filter:
progid:DXImageTransform.Microsoft.Shadow(color=#969696,direction=0,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#969696,direction=45,strength=2),
progid:DXImageTransform.Microsoft.Shadow(color=#969696,direction=90,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#969696,direction=135,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#969696,direction=180,strength=10),
progid:DXImageTransform.Microsoft.Shadow(color=#969696,direction=225,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#969696,direction=270,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#969696,direction=315,strength=2);
A demo can be viewed here: http://hedgerwow.appspot.com/demo/shadow
And for more information on IE filters see this MSDN article: http://msdn.microsoft.com/en-us/library/ms532847(v=vs.85).aspx
精彩评论