简体   繁体   中英

IE9 gradient + image

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?

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 */

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM