刚才看见有人回答这个问题了,怎么又没了

IE10已经不再支持DirectXfilter,因为直接可以使用CSS3了。

下面是跨浏览器的写法

.top_nav { width: 100%; height: 29px; /* 如果浏览器不支持渐变,使用图像作为背景 */ background: url(gradient.jpg); /* Webkit: Safari 4-5, Chrome 1-9 */ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#636363), to(#393939)); /* Webkit: Safari 5.1+, Chrome 10+ */ background: -webkit-linear-gradient(top, #636363, #393939); /* Firefox 3.6+ */ background: -moz-linear-gradient(top, #636363, #393939); /* Opera 11.10+ */ background: -o-linear-gradient(top, #636363, #393939); /* IE 10 */ background: -ms-linear-gradient(top, #636363, #393939); /* IE < 10 */ FILTER:(startColorStr=#636363, endColorStr=#393939); // CSS3 标准 background: linear-gradient(#636363, #393939);}