开发者

CSS IE Filter and background image?

Can you use the CSS Filter attribute for IE gradients AND implement a background开发者_JAVA百科 image?

/*filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#2c8bcf', endColorstr='#0068b3');*/


As far as I know the background has to be "transparent" or none for the gradient filter to work..

perhaps you could wrap the gradient div with another div and put the background image on the outer one?

Wait! it does appear to work, glad I checked..

Working Example (IE only)

sorry about that I really thought it didn't work with a background, but couldn't find a reliable source - anyway in that fiddle above I changed the gradient to go from transparent to black


I'm not convinced that it can be done. It appears that in the jsfiddle above, the hex values have an extra 2 "0"s in them. if you set the values to actual hex chars, the example does not work. perhaps the background will show through if the gradient is going from transparent to a color only

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜