IE9 gradient + image

2019-04-15 10:54发布

I want to use the filter CSS property for both a gradient and an image. I found and tried something like the following:

filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/Controls/Calendar/Events/email.png'), progid:DXImageTransform.Microsoft.gradient( startColorstr='#D9D9D9', endColorstr='#989898',GradientType=0 ); /* IE6-9 */

the problem is that only 1st part of the filter applies. Does anyone know how to do it?

1条回答
狗以群分
2楼-- · 2019-04-15 11:17

According to the Microsoft Developer Network, you can "apply multiple filters", by separating them with spaces.

Using the following code (no comma between the two filters) should work:

filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/Controls/Calendar/Events/email.png') progid:DXImageTransform.Microsoft.gradient( startColorstr='#D9D9D9', endColorstr='#989898',GradientType=0 ); /* IE6-9 */
查看更多
登录 后发表回答