我使用 Ultimate CSS Gradient Generator 创建了以下渐变。它在除 IE 之外的任何浏览器中都能正确显示(我已经在 IE7、IE8 和 IE9 中对其进行了测试)。在大多数浏览器中,渐变是绿色的。在 IE 中,渐变是蓝色和黑色。任何想法为什么?自生成代码以来,我没有篡改代码。
background: #104815; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMTAwJSIgeDI9IjEwMCUiIHkyPSIwJSI+CiAgICA8c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjMTA0ODE1IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzkyYjY5MiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
background: -moz-linear-gradient(45deg, #104815 0%, #92b692 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#104815), color-stop(100%,#92b692)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(45deg, #104815 0%,#92b692 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(45deg, #104815 0%,#92b692 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(45deg, #104815 0%,#92b692 100%); /* IE10+ */
background: linear-gradient(45deg, #104815 0%,#92b692 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#104815', endColorstr='#92b692',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */
这是使用 NetRenderer 的屏幕截图,显示了 IE8 中的蓝黑渐变: