dropShadow过滤器在IE 6,7和8中更改图像 [英] dropShadow filter altering an image in IE 6, 7 and 8

查看:51
本文介绍了dropShadow过滤器在IE 6,7和8中更改图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个图片缩略图,其中包含了一个阴影。这是我正在使用的风格:

img.thumbnail
{  / *单位必须为px * /
  光标             :指针;
  边框宽度       :1px;
  边框样式       :solid;
  边框颜色       :黑色;
  背景色   :白色;
  填充            :5px;
  余量 - 右       :5px; / *必须与影子金额相同* /
  边距      :5px; / *必须与影子金额相同* /
  箱阴影         :5px 5px 10px DarkGray; / * CSS3    * /
   -moz-箱阴影    :5px 5px 10px DarkGray; / * Mozilla * / /   -webkit-box-shadow:5px 5px 10px DarkGray; / * Webkit  * /
   -MS-滤波器&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; :"progid:DXImageTransform.Microsoft.dropShadow(color = DarkGray,offX = 5,offY = 5,positive = true)" ;; / *> = IE8 * / /  过滤&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; :&NBSP; progid:DXImageTransform.Microsoft.dropShadow(color = DarkGray,offX = 5,offY = 5,positive = true);  / *< = IE7 * /
}}
我使用* box-shadow用于非IE浏览器和*过滤器用于IE 6,7和8.问题是在IE 6,7和8上,该图像上的像素成为阴影颜色。在这种情况下,颜色是"DarkGray"。如果我使投影红色,我的图像中的那些像素变为红色。据我所知,只有一种颜色被分配了阴影颜色,那就是RGB十六进制三联体是02050A(几乎是黑色)。我尝试在图像上更改这些颜色,但jpeg压缩似乎总是会产生有问题的杂散像素。

有没有人知道如何防止dropShadow过滤器导致此问题?

谢谢,

Mike

解决方案

你好Mike,你是什么图像编辑器? ?
格式可能会在浏览器中为您提供更一致的结果。

发现图像是connect.microsoft.com/ie
的已知问题。
问候。

I have an image thumbnail that I have included a dropshadow. Here is the style that I'm using:

img.thumbnail
{  /* units must be in px */
   cursor             : pointer;
   border-width       : 1px;
   border-style       : solid;
   border-color       : black;
   background-color   : white;
   padding            : 5px;
   margin-right       : 5px; /* must be same as shadow amount */
   margin-bottom      : 5px; /* must be same as shadow amount */
   box-shadow         : 5px 5px 10px DarkGray; /* CSS3    */
   -moz-box-shadow    : 5px 5px 10px DarkGray; /* Mozilla */
   -webkit-box-shadow : 5px 5px 10px DarkGray; /* Webkit  */
   -ms-filter         : "progid:DXImageTransform.Microsoft.dropShadow(color=DarkGray, offX=5, offY=5, positive=true)"; /* >= IE8 */
   filter             :  progid:DXImageTransform.Microsoft.dropShadow(color=DarkGray, offX=5, offY=5, positive=true);  /* <= IE7 */
}

I'm using *box-shadow for non-IE browsers and the *filter for IE 6, 7 and 8. The problem is that on IE 6, 7 and 8 on one there are pixels on that image that become the shadow color. In this case the color is "DarkGray". If I make the drop shadow red, the those pixels in my image become red. As far as I can tell only one color is being assigned the drop shadow color and that is the RGB hex triplet is 02050A (almost black). I've tried changing those colors on the image but the jpeg compression seems to always create stray pixels that have the issue.

Does anyone know how to prevent the dropShadow filter from causing this problem?

Thanks,

Mike

解决方案

Hi Mike,

What image editor are you using?

png format may give you more consistant results across browsers.

Spotted images is a known issue on connect.microsoft.com/ie

Regards.


这篇关于dropShadow过滤器在IE 6,7和8中更改图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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