Shadow & Opacity In css3 For IE8 (Not Match)

喜你入骨 提交于 2019-12-18 09:40:21

问题


i have some images (in front of my bachground-image) with low opacity(png format) and every thing was good in ie8 & firefox until i add pie.htc(or border-radious.htc from google code) for rounded corners & Shadow Box in ie8...

after adding pie.htc by :

behaviour : url(pie.htc);

and adding below codes :

border-radius:15px;
-moz-border-radius:15px;
-webkit-border-radius:15px;
box-shadow: 5px 5px 20px red;
-moz-box-shadow: 5px 5px 20px red;
-webkit-box-shadow: 5px 5px 20px red;

the opacity of my images has gone...

i test it with a simple html project and figured out when we use shadow box in ie 8(just ie8 & ff is ok) the shadow fills our entire element , so the opacity is wanished.

how can i fix this shadow + opacity problem?

=====================================================

MY QUESTION IN ONOTHER WAY :

HOW CAN WE COMBINE THE BELOW CODES FOR IE8 (with keeping opacity):

-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=25)";//opacity
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=25);//opacity

-ms-filter: "progid:DXImageTransform.Microsoft.dropShadow(attribute1=value1, attribute2=value2, etc)";//shadow

thanks in advance


回答1:


icant is correct but has a small typo. It should be progid instead of profid. I tried editing but it wouldn't let me edit just one letter.

filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=25) progid:DXImageTransform.Microsoft.dropShadow(attribute1=value1, attribute2=value2, etc);

Thanks icant!




回答2:


it seems it's not possible to use shadow with opacity In IE 8... When You add shadow after opacity to an element (in firefox every thing is ok) in IE8 you can not feel Opacity exists , because of that shadow fills the entire element and do n't let the opacity show itself.

however i checked this issue by the simple html project and searched for solving this issue with no results / if you find a solution about this plz share it with us.




回答3:


Just put the shadow after the opacity and add a space in-between. It's as simple as it could be.

filter: profid:DXImageTransform.Microsoft.Alpha(Opacity=25) progid:DXImageTransform.Microsoft.dropShadow(attribute1=value1, attribute2=value2, etc);


来源:https://stackoverflow.com/questions/5581275/shadow-opacity-in-css3-for-ie8-not-match

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!