IE7 和 IE8 中的框阴影 [英] Box shadow in IE7 and IE8
问题描述
我想在 IE7 和 IE8 中实现框阴影.我已经尝试了一切但没有成功.这是我用来将彩色阴影应用于 div 的 css:
I want to implement box shadows in IE7 and IE8. I have tried everything without succeeding. Here is the css that I am using to apply colored shadow to a div:
.bright{
position: absolute;
z-index: 1;
-moz-box-shadow: 0px -3px 55px 20px #147197;
box-shadow: 0px -3px 55px 20px #147197;
-webkit-box-shadow: 0px -3px 55px 20px #147197;
behavior: url(ie-css3.htc);
}
这个 ie-css3.htc 文件是解决 IE 阴影问题的方法.但它只给出黑色阴影,而不是彩色阴影.我试过了:
This ie-css3.htc file is a solution to IE shadow problems. But it only gives black shadows, not colour shadows. I tried:
filter: progid:DXImageTransform.Microsoft.Shadow(color='#969696', Direction=100, Strength=13);
但它创建了一个定向阴影,我想要一个全方位的阴影.还尝试了模糊过滤器,但它需要有额外的 div,这在我目前的情况下是不可取的.对此问题有任何专家意见吗?
But it creates a directional shadow, and I want an omni-directional shadow. Also tried blur filter but it needs to have additional divs which is unadvisable in my current case. Any expert opinion on this problem ?
推荐答案
使用 CSS3 PIE,它模拟 一些 CSS3 属性在旧版 IE 中.
Use CSS3 PIE, which emulates some CSS3 properties in older versions of IE.
它支持 box-shadow
(除了inset
关键字).
It supports box-shadow
(except for the inset
keyword).
这篇关于IE7 和 IE8 中的框阴影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!