箱子阴影在IE7和IE8 [英] Box shadow in IE7 and IE8

查看:118
本文介绍了箱子阴影在IE7和IE8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在IE7和IE8中实现框阴影。
我试过一切没有成功。这里是我使用的CSS应用彩色阴影到div:

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 插入关键字)之外,还可以使用

It supports box-shadow (except for the inset keyword).

这篇关于箱子阴影在IE7和IE8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆